Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


True, 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

What redux misses as well are derived/computed properties, I think mobX has them: https://mobxjs.github.io/mobx/


The 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 , https://medium.com/@adamrackis/querying-a-redux-store-37db8c... , and http://redux.js.org/docs/faq/CodeStructure.html#structure-fi... for more information.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: