Closed
Description
I tried passing a prop from android native code to react-native, on the startup. However, even after copying the exact code from the docs it failed to work.
React Native version: 0.60.3
Steps To Reproduce
- Created a completely blank project
- Added the code from the docs
- Started the app
Describe what you expected to happen:
A text should appear in the app, however all i got was a blank space.
Snack, code example, or link to a repository:
In my MainActivity.java, under my ReactActivityDelegate:
@Override protected Bundle getLaunchOptions() { Bundle initialProperties = new Bundle(); initialProperties.putString("testString", "This should be displayed now"); return initialProperties; }
In the render method of my app.js:
<Text>{this.props.testString}</Text>