You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
route and routes are set up for internal use rather than external use (e.g. route will never be an element as supplied to a route component)
PropTypes.routes will match routes as passed down to matched route/container components as property routes (and itself is no more than oneOfType([ route, arrayOf(route) ])). If there's upcoming API changes where this isn't the case, the PropTypes changes belong in that version
That actually illustrates the exact problem with the current PropTypes setup, and why we need to change it. It's currently a confusing assortment of internal and external prop types. routes in that context refers not to what your component receives, but to the acceptable prop taken by <Router>. It's not the routes prop injected into route components.
You're right that we shouldn't have taken these out without a major bump, but these need to go away anyway. I'm thinking that routerShape is the only one we can keep.
After perusing the PropTypes documentation, the relevant code, and the offending PR and related PropTypes commit and related docs commit, which doesn't actually match up with the offending PropTypes change.
The change landed in 2.2.0, described as only "Minor: Update PropTypes"
The text was updated successfully, but these errors were encountered: