CopyPastor

Detecting plagiarism made easy.

Score: 1.8286013299519115; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-02-14
by Ben.

Original Post

Original - Posted on 2018-08-16
by Nerius Jok



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I had a similar issue on react-navigation v2. According to [drawer docs][1] you can define navigation options right after routes initialization and prohibited it to display Drawer navigator in defined routes.

routes looked like :
const RoutesStack = StackNavigator({ Authentication: { screen: Authentication, },
Then I added Options under it :
RoutesStack.navigationOptions = ({ navigation }) => { name = (navigation.state.index !== undefined ? navigation.state.routes[navigation.state.index] : navigation.state.routeName) let drawerLockMode = 'locked-closed' if (name.routeName != 'Authentication' && name.routeName != 'Signup') { drawerLockMode = 'unlocked' } return { drawerLockMode, }; }
[1]: https://reactnavigation.org/docs/en/navigation-options-resolution.html#a-drawer-has-a-stack-inside-of-it-and-you-want-to-lock-the-drawer-on-certain-screens
I also have faced this on react-navigation v2. as written in [drawer docs][1] the solution can be to define navigation options right after routes initialization and it forbids to display Drawer navigator in defined routes.
My routes looks like
const RoutesStack = StackNavigator({ Authentication: { screen: Authentication, }, And Options added, bellow routes.
RoutesStack.navigationOptions = ({ navigation }) => { name = (navigation.state.index !== undefined ? navigation.state.routes[navigation.state.index] : navigation.state.routeName) let drawerLockMode = 'locked-closed' if (name.routeName != 'Authentication' && name.routeName != 'Signup') { drawerLockMode = 'unlocked' } return { drawerLockMode, }; }

[1]: https://reactnavigation.org/docs/en/navigation-options-resolution.html#a-drawer-has-a-stack-inside-of-it-and-you-want-to-lock-the-drawer-on-certain-screens

        
Present in both answers; Present only in the new answer; Present only in the old answer;