Reputation: 97
I converted React Native app to web app using react-native-web, but there is a problem to convert Navigator. Does anyone know how to convert it or replace it with something familiar so I can use it on my web app ?
Upvotes: 3
Views: 2223
Reputation: 19498
The only thing we've found that provides a single navigation interface across all three platforms is React-Navigation. Otherwise, you're looking at using one router for web and another for native. Possible, but very sub-optimal.
The downside is that to support all three platforms, you sort-of have to work from the lowest-common-denominator, which is the native style of creating imperative navigation stacks. If you're used to react-router, or the Angular router, you won't love it. And... it's still an early project, with some gaps in docs, api, etc. On the other hand, it's backed by some central players behind React-Native, and is progressing quickly. And it works.
Upvotes: 2