Replies: 1 comment
-
Been playing around in the sandbox and realised that push func actually does a navigate and therefore can be used to pop back to a specific route. PopToTop in a sense can be achieved by using push('/') Took me a while to understand it. Would it be worth having separate backTo and backToRoot functions or is push the intended way of going back? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using the lib and enjoyed it a lot but i'm missing the functionality to pop to root or navigate back to a specific route.
Using React Navigation i would usually use
navigate
orpopToTop
I added a backToRoot function that simply did a popToTop in a fork but don't want to create a PR before i know more about the library, but i would love to be able to help out.
I also created a PR with a documentation fix where it said the back function could take a href param. First It had me confused but in the end it would actually be pretty cool if it could take an optional href. When passed to the back function, it would pop to the route matching the href or popToTop if set to "/"
What do you think? would it be a good case, can i help out building it?
Beta Was this translation helpful? Give feedback.
All reactions