3 ms·
Unless something has changed very recently, you don't have to use Immutable.js and redux together. Redux advises against mutating your state, but doesn't prescr
by talldan 10y ago
Unless something has changed very recently, you don't have to use Immutable.js and redux together. Redux advises against mutating your state, but doesn't prescribe a way to do that.
- cel1ne 10y agoTrue, I did applications with redux and without immutable too, even wrote my own syntax magic for that: https://www.npmjs.com/package/babel-plugin-check-data-access https://www.npmjs.com/package/babel-plugin-check-data-access What redux misses as well are derived/computed properties, I think mobX has them: https://mobxjs.github.io/mobx/ https://mobxjs.github.io/mobx/
- acemarke 10y agoThe standard approach is to store the minimal amount of data directly in the state, and derive data as needed externally to the store. This is usually done with "selector functions". See http://redux.js.org/docs/recipes/ComputingDerivedData.html http://redux.js.org/docs/recipes/ComputingDerivedData.html , https://medium.com/@adamrackis/querying-a-redux-store-37db8c7f3b0f https://medium.com/@adamrackis/querying-a-redux-store-37db8c... , and http://redux.js.org/docs/faq/CodeStructure.html#structure-file-structure http://redux.js.org/docs/faq/CodeStructure.html#structure-fi... for more information.