Easy-peasy: WATCH OUT in Production!! - Redux dev tools is enabled by default

Created on 5 Sep 2020  路  3Comments  路  Source: ctrlplusb/easy-peasy

Watch out!!! DevTools comes true as default.

I'm building the app in production mode NODE_ENV=production, and after deploying the build folder, the redux dev tools extension can see the entire state.
Additionally, I'm persisting and encrypting the local storage, this works fine, but the chrome extension can see the whole thing in plain text.

EDIT: Found this piece in the docs:

devTools (boolean, optional, default=true)

Setting this to true will enable the Redux Dev Tools Extension.

Most people won't notice this and can have their store publicly accessible without knowing.

new-feature

Most helpful comment

v4 will include the behaviour i described :)

All 3 comments

Haha, a bit dramatic for my tastes.

I'll queue in a patch to default it for dev environment only.

In the mean time you can do similar in your createStore call:

createStore(model, {
  devTools: process.env.NODE_ENV === 'development'
});

Great lib though, I've been using it for almost 2 years now but until now I noticed this, had to patch all my sites inmediately.

v4 will include the behaviour i described :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctrlplusb picture ctrlplusb  路  5Comments

giacomorebonato picture giacomorebonato  路  5Comments

pitops picture pitops  路  4Comments

jakobmulvad picture jakobmulvad  路  5Comments

vincentjames501 picture vincentjames501  路  6Comments