-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(native-stack): export NativeStackView to support custom routers on native-stack #10260
Conversation
Hey AdityaPahilwani! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines. |
✔️ Deploy Preview for react-navigation-example ready! 🔨 Explore the source changes: 4353527 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-navigation-example/deploys/61f27e38a4d7dc0007613f32 😎 Browse the preview: https://deploy-preview-10260--react-navigation-example.netlify.app |
Codecov Report
@@ Coverage Diff @@
## main #10260 +/- ##
=======================================
Coverage 74.41% 74.41%
=======================================
Files 160 160
Lines 4858 4858
Branches 1838 1838
=======================================
Hits 3615 3615
Misses 1209 1209
Partials 34 34 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I think we don't need to export NativeStackNavigatorProps
as you can already access it by React.ComponentProps<typeof NativeStackView>
Regarding exporting NativeStackNavigationEventMap
, that's useful but currently, no other navigators export it (afaik). Could you add the export to other navigators as well? Then I'll be happy to merge the PR.
Thanks for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
…on native-stack (react-navigation#10260) Currently, there is no way to create a custom navigator and router on top of **Native-Stack** So by exporting **NativeStackView** along with its types from native-stack, we can use it along with **useNavigationBuilder** to create custom navigators with some additional functionality built on top of it. We can also use **StackRouter** from **@react-navigation/native** to create customised routers and use it with the navigator we created on top of **NativeStackView**. We can follow the same doc to extend NativeStackView with our own router or build additional functionality on top of it. https://reactnavigation.org/docs/custom-navigators#extending-navigators. Co-authored-by: Aditya Pahilwani <aditya.pahilwani@groww.in>
…on native-stack (react-navigation#10260) Currently, there is no way to create a custom navigator and router on top of **Native-Stack** So by exporting **NativeStackView** along with its types from native-stack, we can use it along with **useNavigationBuilder** to create custom navigators with some additional functionality built on top of it. We can also use **StackRouter** from **@react-navigation/native** to create customised routers and use it with the navigator we created on top of **NativeStackView**. We can follow the same doc to extend NativeStackView with our own router or build additional functionality on top of it. https://reactnavigation.org/docs/custom-navigators#extending-navigators. Co-authored-by: Aditya Pahilwani <aditya.pahilwani@groww.in>
…on native-stack (react-navigation#10260) Currently, there is no way to create a custom navigator and router on top of **Native-Stack** So by exporting **NativeStackView** along with its types from native-stack, we can use it along with **useNavigationBuilder** to create custom navigators with some additional functionality built on top of it. We can also use **StackRouter** from **@react-navigation/native** to create customised routers and use it with the navigator we created on top of **NativeStackView**. We can follow the same doc to extend NativeStackView with our own router or build additional functionality on top of it. https://reactnavigation.org/docs/custom-navigators#extending-navigators. Co-authored-by: Aditya Pahilwani <aditya.pahilwani@groww.in>
Currently, there is no way to create a custom navigator and router on top of Native-Stack
So by exporting NativeStackView along with its types from native-stack, we can use it along with useNavigationBuilder to create custom navigators with some additional functionality built on top of it.
We can also use StackRouter from @react-navigation/native to create customised routers and use it with the navigator we created on top of NativeStackView.
We can follow the same doc to extend NativeStackView with our own router or build additional functionality on top of it.
https://reactnavigation.org/docs/custom-navigators#extending-navigators.