Done
Details
Assignee
Jason SkomorowskiJason SkomorowskiReporter
Jason SkomorowskiJason SkomorowskiLabels
Priority
P4TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Jason Skomorowski
Jason SkomorowskiReporter
Jason Skomorowski
Jason SkomorowskiLabels
Priority
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created January 18, 2016 at 6:39 AM
Updated March 2, 2017 at 1:41 PM
Resolved December 9, 2016 at 9:50 PM
Redux requires that reducers not mutate the state object in any way. Object.freeze() only works at the top level so there are a large variety of utilities to enable deeper protection. They can also offer some performance improvements based on their immutability guarantees.
The most commonly adopted implementation (and the one endorsed at the talk I went to last week) is ImmutableJS by Facebook. However, it doesn't actually guarantee immutability:
https://github.com/facebook/immutable-js/issues/546
And the syntax is... weird. Very many of the React related tools have special support for it. But perhaps not everything we may one day want to use. There are several alternatives, one that I'm leaning towards is seamless-immutable, they make a good case for it here:
http://tech.noredink.com/post/107617838018/switching-from-immutablejs-to-seamless-immutable
But it seems like that company is moving to use Elm for everything rather than Javascript so I wonder how well it will be maintained going forward? OTOH, not exactly an OS, fairly simple thing and has enough traction that it probably is okay?
https://github.com/rtfeldman/seamless-immutable
http://tech.noredink.com/post/136615783598/welcome-evan
At the moment I'm playing with it on the experiments repo as that's what the redux-crud package uses for its reducers. However it's very likely we'll reimplement that for OKAPI-specific crud anyway (OLE-89)