-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Description
First of all, thank you for making react-router available to the world :)
I'm not sure if this is the best place to ask about this but given that this is monitored by the maintainers I figured I could put my question here.
My question is around the fact that based on the currently available documentation for v6 (the migration/upgrade guide) react-router v6 seems to drop out-of-the-box support for class components and all the codebases that already have plenty of them (like ours) due to the following changes:
-
Dropping support for the
render
prop in theRoute
component, which we are using with react-router v5 to pass params to the component (throughprops.match.params
) of the route. -
Replacing the use of
History
(which was passed as a prop to our components automatically in v5) with the newNavigateFunction
and the fact that it's only available through theuseNavigate
hook which of course is not accessible to class components.
Could someone shed the light on this and the future of react-router for all of us who are using class components and will most likely stick with using them for the foreseeable future?
Thanks in advance.