Open dcs3spp opened 5 years ago
I think, you should import {withRouter{ from react router
try this myabe you find it helpful
import { withRouter } from 'react-router';
class yourClassNAme extends Component { ... }
export default withRouter(yourClassNAme );
I think, you should import {withRouter{ from react router try this myabe you find it helpful
import { withRouter } from 'react-router';
class yourClassNAme extends Component { ... }
export default withRouter(yourClassNAme );
I'm having a similar issue, but when I'm trying to do that on my App.js, I get: Error: Invariant failed: You should not use <withRouter(App) /> outside a <Router>
I think, you should import {withRouter{ from react router try this myabe you find it helpful import { withRouter } from 'react-router'; class yourClassNAme extends Component { ... } export default withRouter(yourClassNAme );
I'm having a similar issue, but when I'm trying to do that on my App.js, I get:
Error: Invariant failed: You should not use <withRouter(App) /> outside a <Router>
Found any solution? I'm having exact same issue
Hi,
I am a new user struggling with migrating from react-router to connected-react-router. I am receiving an error:
Uncaught TypeError: Cannot read property 'push' of undefined
when trying to redirect to another page. The redirect happens but I am receiving this error in the console.
Currently, my ErrorBoundary component is still using react-router and is initialised using withRouter. Not sure if that would cause the error??
Where am I incorrectly configuring connected-react-router or is this a bug?
Config is taking too long. I have now managed to get react-router working with withRouter and can access history, current path etc. that way....
Functional component
index.ts for store module
Routing component
Root reducer
Dependencies