Redux: JavaScript 'strict mode';

Created on 27 Apr 2016  Â·  4Comments  Â·  Source: reduxjs/redux

Wondering why you aren't using JavaScript 'strict mode';

Any plans to use strict mode? Will it break things? I see ReactJS source uses strict mode, so wondering why Redux isn't?

Thanks!

Most helpful comment

@giantelk babel injects 'use strict' statements when redux is transpiled for production. Check your node_modules/redux/dist/redux.js if you're using npm, you'll see them all over the place.

All 4 comments

Strict mode is implicit inside ES6 modules.

OK, so what happens on the browser side with browsers that don't support ES6? I guess it's not an issue unless you're writing apps for Win 7 users in corporate environment that won't upgrade to latest browser for whatever IT reason: https://kangax.github.io/compat-table/es6/

@giantelk babel injects 'use strict' statements when redux is transpiled for production. Check your node_modules/redux/dist/redux.js if you're using npm, you'll see them all over the place.

Yes, it's part of the compilation process before the package gets published on npm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

caojinli picture caojinli  Â·  3Comments

rui-ktei picture rui-ktei  Â·  3Comments

ilearnio picture ilearnio  Â·  3Comments

benoneal picture benoneal  Â·  3Comments

mickeyreiss-visor picture mickeyreiss-visor  Â·  3Comments