Preact Signal

import { signal, computed } from "@preact/signals"; const count = signal(0); const double = computed(() => count.value * 2); function Counter() { return ( <button onClick={() => count.value++}> {count} x 2 = {double} </button> ); }
 
 
https://twitter.com/floydophone/status/1629009165422104576?t=iXcnvjicv0Phb9lsTWsbBg&s=19
 
Introducing Signals - Preact
Signals are a way of expressing state that ensure apps stay fast regardless of how complex they get. Signals are based on reactive principles and provide excellent developer ergonomics, with a unique implementation optimized for Virtual DOM. At its core, a signal is an object with a .value property that holds some value.
Introducing Signals - Preact
 
 

Recommendations