-
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.
-
flimsy
A single-file <1kb min+gzip simplified implementation of the reactive core of Solid, optimized for clean code.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The implementation involves unsafe monkey-patching, at least for React:
1. A hook is injected into every single component (!) so that if you use signals, they can perform a re-render.
2. React.createElement is patched so that it can render signal values as Text nodes.
[1] - https://github.com/preactjs/signals/blob/d25e8bac09c94ed3bad...
[2] - https://github.com/preactjs/signals/blob/d25e8bac09c94ed3bad...
Don't get why you would use it over Solid (https://www.solidjs.com). I guess to keep compat with React ecosystem but moving React components to Solid is trivial.
I feel like Solid signals have better DX too.
I guess it's similar to this MobX :)? https://github.com/mobxjs/mobx
These are difficult to understand concepts imo. I have written an annotated implementation of a simple reactive system (you may want to run it through Prettier if that's your thing): https://github.com/fabiospampinato/flimsy/blob/master/src/fl...
A signal is basically a function that you have to go through to read and write a value. In the case of Preact the function is split into getter and setter assigned to the "value" property. The interesting thing about signals is that they can tell their parent computation to re-execute, automatically, without any manual dependency array.
A computed is a signal generated from a function rather than a primitive. So like the function that generates the value is re-executed automatically whenever any of the signals read inside it change.
FWIW, one specific counter-example would be Etsy choosing to adopt Preact to migrate upwards from React 15:
- https://github.com/mq2thez/blog/blob/main/upgrade-react-etsy...
- https://www.etsy.com/codeascraft/mobius-adopting-jsx-while-p...
For Preact, there is a TODO pointing to [1] which was merged in 10.10.3, so hopefully that can be fixed soon?
[1] https://github.com/preactjs/preact/pull/3671
Really interesting to see Preact adopt this kind of model.
I have been working on a similar programming model for a while, where this kind of state management is the only approach:
https://github.com/sunesimonsen/dependable-view
https://github.com/sunesimonsen/dependable-state
The library has other kinds of agendas like being able to run without a build step, being really small and allow multiple versions in the page.
Examples:
I suggest using jotai for atomic state management. What they're trying to do is nice, but I think it's full of unnecessary complexity.
https://jotai.org/
But some libraries are not build with performance in mind and libraries like [momentjs](https://momentjs.com/) have proved to be performance bottlenecks on many occasions.
Related posts
-
Episode 24/13: Native Signals, Details on Angular/Wiz, Alan Agius on the Angular CLI
-
Show HN: Cami.js – A No Build, Web Component Based Reactive Framework
-
Exploring Frontend Frameworks' Internals – Part 1: The basic structure of Frontend frameworks + Vue 3’s reactivity
-
What Is React and How to Master It?
-
React State Management with Recoil