Skip to content

Bug example on react native Android release build when render method has empty object destructuring braces

Notifications You must be signed in to change notification settings

henkkasoft/empty-object-destructuring

Repository files navigation

empty-object-destructuring

Bug example on react native Android release build when render method has empty object destructuring braces

Reproduce

  1. Project is created with: react native init (react-native 0.55.2 and react 16.3.1)
  2. Only this line is added to beginning of render method: const { } = styles;
  3. These instructions are used to sign the release package: Generate Signed APK
  4. When launched in emulator or device with react-native run-android it works fine (Device: Honor8, Android 7.0)
  5. When installed and launched on device the app crash

It was very frustrating to find the problem because it appeared only on release build and there were quite alot changes and the empty braces was something I didn't expect to be the reason. Of course it was garbage line in my code but I think the bug here is that it should behave the same on debug and release environments.

About

Bug example on react native Android release build when render method has empty object destructuring braces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published