4 ms·
Take it any you want, as _signals_ or something else, what has been lacking in the JavaScript world and reimplemented many times is... functional reactive progr
by hbbio 2y ago
Take it any you want, as _signals_ or something else, what has been lacking in the JavaScript world and reimplemented many times is... functional reactive programming!
Our own take on this is https://github.com/okcontract/cells https://github.com/okcontract/cells where we try to stick as close as possible to the spreadsheet analogy. We're using it to build a very complex web app and it's doing marvels.
- nine_k 2y agoReact is also FRP, only without impure ad-hoc DOM updates :) But this pales in comparison to the world's most successful FRP application, the spreadsheet.
- bubblesnort 2y agoBacon.js already did FRP about 10 years ago.
- halfmatthalfcat 2y agoRxjs, most.js and a handful of others been around for a long time.
- jitl 2y agoIt’s definitely not functional reactive programming, which needs to expose events and the history of events as first-order primitives, and usually a library of operations over the history of events. If you simplify out the event stream primitive from FRP, what you are left with is not FRP.
- hbbio 2y agoYes, as stated in the doc: "cells is a simplified Functional & Reactive (but not strictly FRP) library". There were enough true FRP libraries around not to implement another one. We think cells is a sweet spot where we get most of the benefits of functional programming and reactive programming while simplifying the concepts from the original paper from Elliott and Hudak.
- jbhoot 2y ago`okcontract/cells` seems to be missing one of the two FRP primitives though: streams (of events). One of the best FRP environment for JavaScript is/was FlapJax: https://en.m.wikipedia.org/wiki/Flapjax https://en.m.wikipedia.org/wiki/Flapjax, which incorporates both the primitives and their operations.