proposal-signals
proposal-signals copied to clipboard
A proposal to add signals to JavaScript.
Thanks for this proposal. As with everyone active in this space, I'm very excited about Signals and the prospect of adding them to the language. I understand the reasoning for...
Currenty, the polyfill depends on the existence of the `ngDevMode` variable in several places to decide whether it should throw useful error messages. This is obviously a copy-paste artifact from...
In the spirit of allowing library authors to interop well with both signal-aware and non-signal-aware environments, allowing serialization may be useful. e.g.; if a library author exposes this data structure:...
title. Idk if folks would want _more_ information included, but _I_ think this makes sense -- it's a reactive version of a value, and this toJSON implementation essentially just unwraps...
A key part of this proposal is autotracking. Autotracking can be a somewhat complicated mechanism at first (it is a transparent feature, but has implications for how folks will write...
Async
Lots of people here are interested in handling async/await in conjunction with signals. Some approaches that have been suggested: - @modderme123 's Bubble reactivity uses something like React Suspense, where...
I'm struggling to come up with one. It also seems redundant, since you can just do this: ```js function computedWithOpts(body, opts) { const state = new Signal.State(undefined, opts) return new...
The current API relies on two methods to read or set the state, this is convenient, and in many cases, shorter (less characters) than having to do `o.value = newValue`....
Trying to make [preact signals flavored adapter](https://github.com/dy/sprae/blob/3bc8915c42d28f3396b4613676045143603f74a8/signal.js) based on signal-polyfill, found one perf bottleneck. I am using basic effect implementation (tbh watcher part looks confusing to me atm, mb I...