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
I added react-router 5 into my project where i use typescript (v 3.9) but when I try to use react router i get an error: 'HashRouter' cannot be used as a JSX component. Its instance type 'HashRouter' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'ReactNode' is not assignable to type 'false | Element'. Type 'string' is not assignable to type 'false | Element'.
Something else is going on here, because there's no reason that bit of code should be invalid. Check how you're importing the component or your build system. This isn't an issue with React Router.
I added react-router 5 into my project where i use typescript (v 3.9) but when I try to use react router i get an error:
'HashRouter' cannot be used as a JSX component. Its instance type 'HashRouter' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'ReactNode' is not assignable to type 'false | Element'. Type 'string' is not assignable to type 'false | Element'.
Here is how my render method look like
The text was updated successfully, but these errors were encountered: