question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redux Dev Tool Extension can access the state in production

See original GitHub issue

Describe the bug In the freecodecamp.org website, Redux dev tools extension can be used to access the current and previous state. It may be noted that, actions can not be dispatched through the Redux Dev Tool extension.

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘freecodecamp.org’
  2. Click on the Redux Dev Tools Extension

Expected behavior It is widely accepted as a best practice to not have development/debugging features in the production codebase. So, in the current context the Redux Dev Tools shouldn’t be able to access the state.

Screenshots Capture

Desktop (please complete the following information):

  • OS: Windows 10 (64 Bit)
  • Browser: Google Chrome
  • Version: Version 81.0.4044.122 (Official Build) (64-bit)

Additional context Redux Dev Tools Extension can be found here.

It seems that the __REDUX_DEVTOOLS_EXTENSION__ was exposed to the global window object which allows the Redux Dev Tool extension to read state. While bundling for the production codebase, this should be removed to avoid such behaviour.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
ojeytonwilliamscommented, Apr 27, 2020

Why not just use compose or composeWithDevTools depending on the value of FREECODECAMP_NODE_ENV?

0reactions
raisedadeadcommented, Apr 28, 2020

Thanks for your patience, we will review the PR in due course.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Redux DevTools in production | by Mihail Diordiev
Even though it aims to be a tool for the development environment, Redux DevTools Extension has lots of benefits in production: Get the...
Read more >
How to use the redux dev tools to speed up development and ...
They can be used during the development and production state of any application. ... Firstly, let's install the Redux DevTools extension.
Read more >
Redux Devtool (chrome extension) not displaying state
So basically in the state I have the current selected user. But I don't know why the state keep beeing empty in redux...
Read more >
Redux DevTools: Tips and tricks for faster debugging
In most production apps, state is divided in small sub state objects usually reflecting different modules in apps. Debugging cases might require ...
Read more >
zalmoxisus/redux-devtools-extension - GitHub
You'll have to add 'process.env.NODE_ENV': JSON.stringify('production') in your Webpack config for the production bundle (to envify). If you use create- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found