Open forresto opened 10 years ago
Is immutable data a bad idea with animation?
Google says: probably. But then again... https://thestrangeloop.com/sessions/clojure-in-unity-3d-functional-video-game-development
Once everything rendered is in specifiable via props
, intermediate/internal state is in state
and all events call callbacks specified in props, then the app can keep the state datastructure however it likes.
Model? Store?
We are hooking into
noflo.Graph
directly, listening for change events to rerender. I'm thinking that an abstracted model will clean up some of the spaghetti.Inputs:
noflo.Graph
Output:
If we use an immutable data structure (mori, immutable-js, React.addons.update), and everything is sent to components as props, then all of the shouldComponentUpdate() calls will be simplified to a single, fast
===
.So, the model will be responsible for: