Skip to content

es6 let block-scope binding construct is particularly dangerous #1328

@psbanka

Description

@psbanka

React-native's support for ES6 is fantastic, but one area where this could use some improvement is how let is handled.

When a developer is using Chrome for debugging, the let statement is fine and no errors are produced. However, when a dev switches to the native JS engine in the phone or emulator, you get a white-screen crash with no error messages. This can result in a very sad and painful debugging experience, that I can personally attest to 😢 .

It would be nice if the pre-compile step would throw an exception for let when bundling or to throw an error in Chrome's console. Is that possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions