Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions versioned_docs/version-3.x/navigation-prop.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,7 @@ Be sure to always check that the call returns a valid value.
class UserCreateScreen extends Component {
static navigationOptions = ({ navigation }) => {
const parent = navigation.dangerouslyGetParent();
const gesturesEnabled =
parent &&
parent.state &&
parent.state.routeName === 'StackWithEnabledGestures';
const gesturesEnabled = parent?.state?.routeName === 'StackWithEnabledGestures';

return {
title: 'New User',
Expand Down