Open SuperMoon opened 8 years ago
I'm new to RN and react-native-router . How can I use routes in titleCompoent ? my code is something like this,it will cause an error :"this.props.toRoute is not a function" var TitleComp = React.createClass({ render:function(){ return (
); }, _toSearchPage: function(){ this.props.toRoute({ name: "To Search Page", component: SearchPage } ); }
});
var MyApp = React.createClass({ render:function() { return (
)
} }); var firstRoute = { name: 'Welcome!', titleComponent:TitleComp, component: SearchPage, };
AppRegistry.registerComponent('navProject', () => MyApp);
This component is currently defunct. Please adress questions here : github.com/MikaelCarpenter/gb-native-router
I'm new to RN and react-native-router . How can I use routes in titleCompoent ? my code is something like this,it will cause an error :"this.props.toRoute is not a function" var TitleComp = React.createClass({ render:function(){ return (
});
var MyApp = React.createClass({ render:function() { return (
} }); var firstRoute = { name: 'Welcome!', titleComponent:TitleComp, component: SearchPage, };
AppRegistry.registerComponent('navProject', () => MyApp);