recyclejs / recycle

Convert functional/reactive object description using RxJS into React component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: state update, immutable approach

DJWassink opened this issue · comments

Gratz on the library really dig the overal concept.

I however have a simple question that I would like to get answered.
In libraries like redux etc. there is a need for a immutable approach for properly re-rendering all the components (think about shouldComponentUpdate etc.).

In the examples given in the docs (for example here) this concept doesn't seem to be the standard?

Shouldn't especially in a functional approach "pure reducers" be preferred above the current usage?

Yes, it is preferred to use immutable approach, but I wanted to keep it as simple as possible given the fact there are three TodoMVC examples and if you follow them you will end up with a flat state where there will be no need for immutability.

Nevertheless, I agree, enforcing immutability is always a good idea.

I should probably write something about it in the docs, so I'll leave this issue open until its done.
Thanks!

Since for new version, a default store is powered by Redux, I think there is no need for additional "immutability approach" explanations.