-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Description
This is a little sketchy, but here goes -
I'd like to have access to the value of components
from here. These are all the components (or multi-component objects) for each of the active routes.
The use case is that in react-router-relay
, I need access to the component for a given route to properly proxy the queries for that route. I'm currently doing this: https://github.com/relay-tools/react-router-relay/blob/v0.5.0/src/RouteAggregator.js#L35, which clearly doesn't work even in sync case where components
is specified instead of just component
, but I don't see a good way to extend this to work with getComponent
at all.
I can think of a few options:
- Just pass that
components
array to each route component - Bringing back Allow overriding RoutingContext instead of createElement #1870
- Setting
component
orcomponents
on theroute
after thegetComponent
orgetComponents
call succeeds
None of those are great, though. This is really more of a "what should I do" question than anything else, I suppose.