Lib Mode: When use the Component prop (config option), pass Route.ComponentProps to the component #13162
kentcdodds
started this conversation in
Proposals
Replies: 2 comments 1 reply
-
As noted by @rossipedia, let's also do this for |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is this even possible? The framework mode relies on a very specific project structure sprinkled with codegen magic, which is incompatible with library mode being shoved into whatever codebase. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When you're using React Router in library mode, you can configure the router with routes that have an element or a component. I think it would make a lot of sense for the component to receive the same component props that you get when using React Router in framework mode to better align these two ways of using React Router.
For example:
As for types, I'm not sure whether there's a good way to make that work, but I expect there is. I just think it would be nice to align these ways of building React Router apps.
Beta Was this translation helpful? Give feedback.
All reactions