-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Routing docs #1628
Comments
If you were using React Router, couldn't you statically compose the fragments and load all of the data, even though the components haven't been displayed yet? |
With v2 and v3, yes, and that's exactly what I do in react-router-relay. The v4 API doesn't meaningfully support this use case since it's components all the way down, and the config-driven support is highly suboptimal. I take a slightly different approach in Found with Relay 1 – I call into the imperative Relay APIs directly and then render a |
I've updated Found Relay to support Relay Modern on an alpha release: https://github.com/4Catalyzer/found-relay/releases/tag/v0.3.0-alpha.1. The API is very similar in principle to the old react-router-relay API, but matches Does this make sense as an option here? I have an implementation TodoMVC with routing and Relay Modern here for reference. The mutations are a bit complicated than in the non-routing example due to the filtered views, and more complex than the Relay Classic example because they are more correct with avoiding unnecessary refetching. |
Please feel free to send a PR to include |
Wanted to add some quick notes on routing docs –
Relay.Route
mechanism was ever generally used by external users of Relayenvironment.primeCache
to preload data for nested routes, to simulate the effect of nesting<Relay.Renderer>
s while still fetching all the data in parallel<QueryRenderer>
s, you'd end up unavoidably waterfalling for no good reasonThe text was updated successfully, but these errors were encountered: