Reputation: 315
here is my View to switch page
this.props.navigator.push({
component: QuestionDetail,
passProps: {
id: id,
enteredDetail: function() {
console.log(this)
}
}
});
// in QuestionDetail
render: function() {
this.props.enteredDetail();
....
in Xcode I saw this
RCTJSLog> {"navigator":{},"route":{"passProps":{"id":"1010000002652090"}},"id":"1010000002652090"}
RCTJSLog> {"navigator":{},"route":{"passProps":{"id":"1010000002652090"}},"id":"1010000002652090"}
it appear twice! why?
Upvotes: 0
Views: 372
Reputation: 16476
See this issue:
https://github.com/facebook/react-native/issues/151
in order for the react diffing algorithm to correctly reset properties back to their default state, we create a single dummy "defaultView" for every type of view
Upvotes: 2