Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
How does it differ from <https://github.com/tc39/proposal-observable/>?
The key is topological sorting of a dependency graph. This can be done implicitly by storing a reactive variable node’s depth once it is created, and just making sure that updates are enqueued in separate queues per depth.
I have a somewhat small implementation that transparently batches updates with queueMicrotask in this library (bruh): https://github.com/Technical-Source/bruh/blob/a829af9df9405b...
js does not need Observable API, it already had Async Iterables that soon will be enhanced with these helpers https://github.com/tc39/proposal-async-iterator-helpers that are similar to this proposal
My "observation" about observability and "reactive type" of code is that old school proxies, events and ways of defining expressions that get computed when the dependecies change is a much simpler way of programm reactive UIs (for example MVVM style of architectures) compared with a functional programming approach. Of course the naive approch does not work properly because any change in dependent values will trigger undesired side effects, reentrace, infinite loops, etc. However in a programming language like JavaScript if the observability is based on a Sound PubSub System these kind of problems reduce to becoming surpinsingly irelevant. If you want to undestand more about this, take a look on https://github.com/OpenDSU/soundpubsub/ We used this approach to implement two ways binding and reactive MVVM web frameworks but this comment is to present this insight that it is possible to have a "procedural" and "spreadsheet like" method of implementing intuitive and sound rectivity without bending your mind with streams or anything very abstract. In a low code environment this could be essential.
I feel the same way which is why I decided to help maintain the project. Async flow control is very tricky even in js–land. Having watchers live inside of a while-loop is a powerful construct that lends itself to interest flow control patterns.
I'm also in the process of rebuilding redux-saga but without the redux part: https://github.com/neurosnap/starfx
It's still in alpha stage, but it is very reminiscent of redux-saga.
Related posts
- Show HN: A tiny (850B) and fast reactive observables library via functions
- Show HN: Bruh – A tiny Functional-Reactive library for the web
- Bruh - A minimalist functional-reactive web library
- Show HN: Bruh JavaScript, a minimalist functional-reactive web library
- The thinnest possible layer between development and production for the modern web.