Environment:
OS: macOS High Sierra 10.13.4
Node: 9.11.0
Yarn: 1.5.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3
1ăCreate a new RN project with WebStorm
2ăDefine a Symbol in App.js
3ăSelect the Android platform to run
4ăCodeïŒ
type Props = {};
const Test = Symbol('test');
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit App.js
</Text>
<Text style={styles.instructions}>
{instructions}
</Text>
</View>
);
}
}
1ăThe following problems arise

2ăWhen selecting the "Debug JS Remotely" menu, the code works normally.
3ăThe code works well on the iOS platformă
@isnifer
Thanks for your help
es6-symbol unfortunately isn't working in my project. Importing it results in a Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead error. Same with babel-polyfill.
Is Symbol support in the Android runtime on the roadmap? That's the broader issue here, and the fact that a workaround (sometimes) exists doesn't mean this isn't an implementation gap.
@Zacqary did you come up with a solution? I'm having the exact same issue.
I import babel-polyfill instead of es6-symbol and it works.
Most helpful comment
es6-symbolunfortunately isn't working in my project. Importing it results in aObjects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array insteaderror. Same withbabel-polyfill.Is Symbol support in the Android runtime on the roadmap? That's the broader issue here, and the fact that a workaround (sometimes) exists doesn't mean this isn't an implementation gap.