Skip to content
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

4.0 proptype error when used with react router #11

Closed
frehner opened this issue Oct 9, 2018 · 0 comments
Closed

4.0 proptype error when used with react router #11

frehner opened this issue Oct 9, 2018 · 0 comments

Comments

@frehner
Copy link

frehner commented Oct 9, 2018

React Router currently expects a function as a component for Routes. However, React.forwardRef returns an object instead of a function, which then fails the prop type validation. See remix-run/react-router#6384 for more details

In other words, if you wrap a component in @Cancelable, you'll get a proptype warning if you use that component in <Route path="/" component={WrappedComponent} /> since v4 is now using the forward ref API.

@frehner frehner closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant