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

elado picture elado  路  3Comments

benoneal picture benoneal  路  3Comments

olalonde picture olalonde  路  3Comments

CellOcean picture CellOcean  路  3Comments

jimbolla picture jimbolla  路  3Comments