3 ms·
You can replace redux with any FRP library. Your state is a signal/stream/whatever that folds over an initial state with a signal/stream/whatever of actions/mes
by twfarland 9y ago
You can replace redux with any FRP library. Your state is a signal/stream/whatever that folds over an initial state with a signal/stream/whatever of actions/messages. Your top level view component should listen and render based on that. Example: https://github.com/twfarland/sprezzatura-acto-mario https://github.com/twfarland/sprezzatura-acto-mario
- lomnakkus 9y agoYeah, I'm pretty amazed at the amount of attention that a simple "fold"[1] gets in JS-land. Yeah, OK, Redux (etc.) is also a little bit of a pattern for sort-of-algebraic data types, but really... I prefer using a language that actually supports algebraic data types natively like Scala.js, Reason, Bucklescript, js_of_ocaml or GHCJS. I appreciate that these may not be an option for everyone, but at least one of them should be an option for the vast majority of current frontend developers. [1] Well, technically I guess it would be a foldM?