reactjs - Failed context type: The context `router.push` is marked as required in `withRouter(t)`, but its value is `undefined` -


modules react-router , react-router both have version 4.2.2 . following react routing .

const history = synchistorywithstore(createbrowserhistory(), store); const headerwithrouter = withrouter(header);       reactdom.render(              <provider store = {store}>             <router history = {history} >                <section>                     <headerwithrouter/>                     <route = '/' = '/deals'/>                     <route exact path="/deals" component={deallist}/>                     <route path = "/deal" component={formdeal}/>                     <route path = "/admin" component={admin}/>                     <route path = "/mandate" component={mandate}/>                     <footer/>                </section>           </router>           </provider>               ,         document.getelementbyid('app'));   

the thing not working <route = '/' = '/deals'/> , warning - failed context type: contextrouter.pushis marked required inwithrouter(t), value isundefined.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -