react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v2] [Android] this.props.navigator is not accessible and returns undefined in all components

Open Anarcho-X opened this issue 8 years ago • 2 comments

DESCRIPTION

I am unable to access this.props.navigator in all components. console.log(this.props.navigator) will return undefined

this.props.componentId is accessible so I can still use Navigation.push(this.props.componentId, {...

STEPS TO REPRODUCE

App.js image

screen.js image

LoginForm.js image

ENVIRONMENT

  • React version: 16.4.1
  • React Native Navigation version: 2.0.2483
  • React Native version: 0.55.4
  • Platform(s): Android
  • Device info: Android Emulator (Android 8.1) API 27

ANDROID BUILD

  • buildToolsVersion = "27.0.3"
  • minSdkVersion = 19
  • compileSdkVersion = 26
  • targetSdkVersion = 26
  • supportLibVersion = "26.1.0"

Anarcho-X avatar Aug 20 '18 07:08 Anarcho-X

this.props.navigator is not used anymore in 2.x. You need to use Navigation

DVSoftware avatar Aug 20 '18 09:08 DVSoftware

@DVSoftware I just realised it too ><

Anarcho-X avatar Aug 20 '18 09:08 Anarcho-X