withRouter and ReactDOM.render #13034
-
Hello. ReactDOM.render( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Hello. ReactDOM.render( |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
withRouter
uses the React Context API to provide the router state to your component, therefore if the component you are rendering is not within Next's component tree (i.e. a child of the Context provider) then you cannot access that Context's state viawithRouter
.