Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support react-native? #111

Closed
joonhocho opened this issue Apr 2, 2016 · 5 comments
Closed

How to support react-native? #111

joonhocho opened this issue Apr 2, 2016 · 5 comments

Comments

@joonhocho
Copy link

I am trying to use Relay for both React and React Native and wonder if react-router-relay could be used for react-native as well in the future.
I haven't dug into the source code yet, but how much does react-router-relay depend on browser specific APIs?
react-native exposes their new Navigation APIs here NavigationExperimental.
I am going to be digging into source codes, but could authors of react-router-relay share some gotchas for routing with relay?

@taion
Copy link
Member

taion commented Apr 2, 2016

We've decided at length that we do not recommend React Router style APIs for working with React Native in the general case. We do not currently use React Router for React Native development, and do not plan to do so at any point in the future.

As such, I don't plan on adding support for React Native either here or in React Router, because I don't think it's the right pattern, and because I don't plan on setting up my React Native navigation in that manner. Just use a <RootContainer> per scene.

You can find more details on remix-run/react-router#743 (comment).

cc @skevy

@taion taion closed this as completed Apr 2, 2016
@CoericK
Copy link

CoericK commented Jul 31, 2016

Hey @taion, went into the same question, is this still the recommended way to work, crea a RootContainer per scene?

@taion
Copy link
Member

taion commented Jul 31, 2016

It might work with react-router-native? cc @jmurzy

We don't handle our RN navigation using that sort of approach, so we've just been doing per-scene renderers.

@ghost
Copy link

ghost commented Aug 6, 2016

Does anyone have an example of per-scene renderers with relay?

@joonhocho
Copy link
Author

@Lenin7 https://github.com/joonhocho/react-native-router-relay-todo Here's an example how I am using relay with react-router-native. It needs some tweaks to react-router-native, but it works for me.
I am currently not touching any navigation stuff, so it may be out of date, but you will get the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants