I want the name of the current route or screen in react-navigation which I want to use inside if condition to make some changes.
You can catch it as the following code:
this.props.navigation.state.routeName