HackBrexit / MinistersUnderTheInfluence

MIT License
6 stars 10 forks source link

ui: Fix Redux store #161

Closed aspiers closed 7 years ago

aspiers commented 7 years ago

I noticed some problems with the store, and managed to fix them by combining some new fixes with some old experiments I did ages ago with some nice upstream modules.

I strongly recommend reviewing this PR commit by commit!

elischutze commented 7 years ago

I'm curious, what's the argument for using an immutable decorator for reducer instead of just fromJS()-ing the initial states?

aspiers commented 7 years ago

what's the argument for using an immutable decorator for reducer instead of just fromJS()-ing the initial states?

It's not instead of, it's in addition to. The commit message explains the bug which it fixes. I don't know exactly why it fixes it, but anyway it seems better to be using some maintained module for this than some slightly obscure glue code which does the same job but I'm guessing was copied and pasted into the repo from some online coding site.

elischutze commented 7 years ago

good enought, "it works" is the goal