reactjs - browserHistory undefined with React Router 2.00 release candidates -
with react router 2.0.0rc1-5 have been getting browserhistory undefined after import:
import { browserhistory } 'react-router'
the package seems installed correctly, regardless of version , whether on server or client, have gotten same result.
maybe known bug?
see userouterhistory: https://github.com/rackt/react-router/blob/master/upgrade-guides/v2.0.0.md#using-custom-histories
i'm using in server-side:
import {router, routercontext, match, userouterhistory} 'react-router'; import {creatememoryhistory} 'history'; // ... const apphistory = userouterhistory(creatememoryhistory)({}); const component = ( <provider store={store} key="provider"> <router routes={routes} history={apphistory} /> </provider> );
Comments
Post a Comment