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

Relay modern with routing example #31

Closed
ilanbiala opened this issue Jun 7, 2017 · 7 comments
Closed

Relay modern with routing example #31

ilanbiala opened this issue Jun 7, 2017 · 7 comments

Comments

@ilanbiala
Copy link

Is there an example app that uses Relay Modern with some sort of routing in between pages? If not, is there another repo where I can find something similar?

@taion
Copy link

taion commented Jun 19, 2017

See https://github.com/taion/relay-todomvc, specifically https://github.com/taion/relay-todomvc/tree/found-modern (Relay Modern) and https://github.com/taion/relay-todomvc/tree/found-modern-universal (Relay Modern + SSR).

@jonirrings
Copy link

jonirrings commented Jun 23, 2017

thanks for the example, I'm searching a route library too.
the isomophic-relay-router used previously

@brysgo
Copy link

brysgo commented Jun 23, 2017

I think @taion was pointing at 'Found' as the route library. Also, I am using relay modern with react router 4 without issue. Granted the app I'm using it on isn't huge so there may be some hurdles with a large app.

@taion
Copy link

taion commented Jun 23, 2017

That's correct. Use Found. RRv4 doesn't give you a good way to handle nested queries.

@brysgo
Copy link

brysgo commented Jun 23, 2017

Could you elaborate on that, what is the issue you are thinking of?

@taion
Copy link

taion commented Jun 23, 2017

If you need to nest routes that require Relay data, with RRv4, you're stuck nesting <QueryRenderer>s, which (1) gives you request waterfalls and (2) doesn't easily allow SSR.

@brysgo
Copy link

brysgo commented Jun 23, 2017

Ah, I see. Yeah, my routes just end up looking like this:

<Route
  path={"/nested/:thingId/thing"}
  component={props => <Thing data={data} {...props} />}
/>

And that is how I orchestrate my fragment containers.

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

5 participants