http://fluxxor.com/examples/react-router.html#/
this shows how old version of react-router.
does know how pass flux prop top-level component in react-router 1.0.0?
i saw somewhere in docs in react-router 1.0.0 routes can described objects , means can pass in arbitary props. isn't working me:
routes = path: "/" flux: flux component: app childroutes: [ {path: "/path/to/path", component: comp, flux: flux} ] react.render(<router routes={routes} />, document.getelementbyid("app"))
no sign of flux prop on app.
the syntax coffee script routes object,
as stated here:
https://github.com/binarymuse/fluxxor/issues/137
you can pass function router createelement
property passes flux property down children components.
const createfluxcomponent = (component, props) => { return <component {...props} flux={flux} />; }; react.render( <router createelement={createfluxcomponent}> ...
Comments
Post a Comment