Answer the question
In order to leave comments, you need to log in
How to prevent react-native-navigation by wix with mobx from multiple screen rendering?
The essence of the problem is that when using store on the screen, with each new opening of the screen, the number of its renders increased by 1, that is, the first time you go to this screen, the render happens 1 time, when you go to the screen again, 2 times, and so on. Can be who faced it? Thank you all in advance for your replies
Navigation.registerComponent(
'Screen',
() => props => <Provider
orderStore={OrderStore}
>
<ScreenItem {...props}/>
</Provider>
);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack : {
id: 'MainStack',
children : [
{
component: {
name: 'Splash',
},
}
]
},
},
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question