Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

how can i use route in titleComponent ? #71

@SuperMoon

Description

@SuperMoon

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 (

aaa

);
},
_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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions