@equinor/mad-navigation
v0.4.0
Published
Navigation package built on top of React Navigation
Downloads
318
Readme
Mad Navigation
Mad Navigation is a layer on top of React Navigation that provides additional features to provide a better experience for developers.
Features
- Display custom sub-headers automatically on screens.
- Add onRouteChange prop to navigation containers
Docs
For more detailed information about how to use the package, head to our documentation page
Development
This package has custom navigators created by following this guide. If you want to add additional navigators or update the current navigators to be in sync with React Navigation’s navigators, follow these steps:
- Go to
React Navigation’s repository
and find the navigator you want to copy (usually located within
package-name/src/navigators
directory). Copy the source code. - paste the source code into this package and update imports. Imports that are not provided by the
react navigation package should be created manually (usually only the
XNavigationConfig
). The props can also be recreated by exported types from react navigation + your copiedXNavigationConfig
. - Modify the
descriptors
using thecreateMadDecorators
function. - Use the modified descriptors instead of the original descriptors in the return function