Hacker News new | ask | show | jobs
by Callmenorm 3431 days ago
I agree with you on it being a painpoint.

Is this a web router as well? I think they hinted at that, but it was a little unclear to me. Also, is it really true that react native apps have routing that is too complex for a URI? I can't think of a reason why that is immediately true.

3 comments

On mobile apps, URIs are more like actions than like navigation state. The navigation state can be quite complex because there are often several navigators in an app that each need to maintain the state of several screens.

For an example of how this works on web, try browsing to a doc on on reactnavigation.org, then navigate to the home page, and navigate back to 'Docs'. Notice how the state of the docs tab is retained, even though the previous URI had no awareness of that state. Most websites don't behave this way, but mobile apps do.

yup! the documentation uses react-navigation: https://github.com/react-community/react-navigation/blob/mas...
Documentation seems to be WIP but it looks like it supports web routing. https://reactnavigation.org/docs/guides/web