candis icon indicating copy to clipboard operation
candis copied to clipboard

Add redux-dev-tools setup

Open rupav opened this issue 6 years ago • 3 comments

Explanation About What Code Achieves:
  • Refer https://github.com/zalmoxisus/redux-devtools-extension#12-advanced-store-setup

rupav avatar May 31 '18 02:05 rupav

Do we need Redux-dev-tools in production?

rupav avatar May 31 '18 03:05 rupav

As per their docs, its also recommended to have atleast a restricted version of Redux-dev-tools in production build: - Reference to the blog: https://medium.com/@zalmoxis/using-redux-devtools-in-production-4c5b56c5600f Benefits of having in production:

  • Generate tests for bugs caught in production;
  • Replicate bugs that don’t occur in development
  • User gets info of the internal structure - Candis is opensourced too so not going to be a problem.

Restrictions we will be having -

  • Not storing sensitive data inside the state.
Thanks to Redux architecture, we are not exposing the store object globally in order to hook it into the extension.
In order for a malefic script to get access to your store, it has to replace the extension’s function to act as a store enhancer, but only before the store is created (which usually is not the case of XSS injections).
The best practice is to use full featured version for development
and the restricted one for production

@achillesrasquinha thoughts on this?

rupav avatar May 31 '18 12:05 rupav

https://github.com/reduxjs/redux-devtools/blob/master/docs/Walkthrough.md#exclude-devtools-from-production-builds Will need to create seperate production and development store for including devtools.

rupav avatar Jun 17 '18 19:06 rupav