KodersLab / react-native-for-web

A set of classes and react components to make work your react-native app in a browser. (with some limitations obviously)
MIT License
255 stars 17 forks source link

navigator ? #6

Open chandu0101 opened 9 years ago

chandu0101 commented 9 years ago

web version of react-navigator - https://github.com/bh5-js/react-navigator

can we add this as dependency and expose via react-native-for-web ?

or can we copy the source to navigator folder( ofc if author of bh-react-navigator agree only) ?

WDYT ..

btw in past you told me that you have something called router built on top navigator ,any plans to include that aswell ?

mattiamanzati commented 9 years ago

The problem with that navigator is that it uses

internally instead of allowing which component to use. In particular I would use instead of
, which does more that a simple
. https://github.com/bh5-js/react-navigator/blob/master/src/navigator.js#L439

The router I used in the past I deprecated it in favour of redux-router, which now plays well also on RN, but I will consider update and merge it into the repo!

respectTheCode commented 9 years ago

An example of how you used redux-router would be very helpful.

mattiamanzati commented 9 years ago

There is nothing special to do to use it, you can use react-router as in a normal application, just mount memory history instead of location based one :)

respectTheCode commented 9 years ago

An example would still be helpful. There is a lot of information out there saying that react-router does not work with react-native.