Closed thevishnupradeep closed 6 years ago
Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?
If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label. Thank you for your contributions.
@react-native-bot The issue now contains all the relevant information
React native in android typically runs on older version of javascript engine than iOS so Object.is
might not work by default as it's es6 feature. So, you just have to polyfill it with something like this
@bhandarijiwan but does react-native
have babel
? I still see it working normally with ES6 features.
@pierreneter It does but not everything in es6 is supported out of the box. Here is list of plugins in preset: react-native
. Everything else you need supply a plugin/polyfill yourself.
Commented on the PR - people can use a Babel plugin as a workaround.
When I try to run my JS Code in Android I get error:
E/ReactNativeJS: TypeError: undefined is not a function (evaluating 'Object.is(t.tasks,this.state.tasks)')
This error comes only in Android. It works perfectly in iOS
Environment
Environment: OS: macOS High Sierra 10.13.4 Node: 9.11.1 Yarn: 1.5.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.3 Build version 9E145 Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.3 => 0.55.3
Steps to Reproduce
Use Object.is in code.
Expected Behavior
Should just compare given objects and return a boolean value.
Actual Behavior
Gets an undefined error.