react-everywhere / re-start

react-native template to target multiple platforms :globe_with_meridians: :iphone: :computer: with single codebase.
https://medium.com/@amoghbanta/write-once-use-everywhere-with-react-native-d6e575efe58e#.nfl50gwfg
MIT License
1.3k stars 85 forks source link

Proposal: React Navigation Vs React Native Flux Router / React Router #14

Closed christopherhein closed 7 years ago

christopherhein commented 7 years ago

Seems like the new https://github.com/react-community/react-navigation project could replace the need for the multiple handling of navigation in https://github.com/amoghbanta/reactNativeEverywhere/tree/master/src web integration is documented here - https://reactnavigation.org/docs/guides/web

Still new but curious if this would help reduce duplication. As well redux integration seems to flow a bit better than with react-native-flux-router

Thoughts?

amoghbanta commented 7 years ago

Hi @christopherhein, I came across react-navigation couple of days back, haven't tried it yet but it is in the near plan to test it for web and native using an all common code base. I completely agree that it "could replace the need for the multiple handling of navigation" and reduce the duplication. Seems theoretically perfect to me but i could comment on it better once I give it a try.

kkszysiu commented 7 years ago

For now it doesn't work so good.

They web implementation is very limited for now. I'm trying to do something about it but so far no success.

That's the differences: https://github.com/react-community/react-navigation/blob/master/src/react-navigation.js https://github.com/react-community/react-navigation/blob/master/src/react-navigation.web.js

Without StackNavigator/TabNavigator it seems to be very limited and it gives only routing abilities, no views. I would love to have it.

christopherhein commented 7 years ago

Ah sweet, thanks for the info!

kkszysiu commented 7 years ago

After some tweaks I'm able to run StackNavigator :) It should work the same on both Android, iOS and web.

The example from web: screen capture on 2017-01-29 at 23-17-38

But TabNavigator is really what I desire here.

I will try to push some example how to implement it when I make some code cleanup 👍

christopherhein commented 7 years ago

Oh should I reopen @kkszysiu ?

ppsreejith commented 7 years ago

@kkszysiu , how did you get the css to work? Changing the react-navigation.web.js file allowed me to use StackNavigator but the css is all broken

christopherhein commented 7 years ago

@kkszysiu did you do this in a fork somewhere? wanted to check out what was required to get it working

fotiDim commented 7 years ago

I guess this should be reopened as react-navigation is the way to go

fotiDim commented 7 years ago

@amoghbanta Any update on this?

amoghbanta commented 7 years ago

hey @fotiDim, so I've working on a complete rewrite of react-native-everywhere. The update on this is that react-router guys released v4 and that is exactly what fits our requirement. My aim is to keep it more of plug and play where in you can just replace react-router with react-navigation if you prefer that. It'll be out in a couple of days.

fotiDim commented 7 years ago

@amoghbanta any insights to share on where react navigation fell short?

ajostergaard commented 7 years ago

@amoghbanta - great work and thanks!!! Any news on the rewrite?

amoghbanta commented 7 years ago

hey @ajostergaard, this branch is where the rewrite is going on. Now, since react-native supports templates, so this project will be more of a template(supporting multiple platforms) with some additional scripts. No more git cloning. We are also working on a component library which would support multiple platforms too.

amoghbanta commented 7 years ago

hey @fotiDim, its just that react-router's API was an exact match/requirement for us. I personally haven't played much with react-navigation so I can't comment. As i said earlier, it would be more of a plug and play thing, so you can use the one you feel is right for your project.

ajostergaard commented 7 years ago

Thanks @amoghbanta. How mature is the template? Ready for a relative beginner to use for an app?

amoghbanta commented 7 years ago

Template is ready to be used, you guys can give it a try and as of now it works on react-router v4. Closing this one.