@lynx-js/react-signals-canary
v0.0.2
Published
Thread-aware Preact Signals integration for ReactLynx.
Readme
@lynx-js/react-signals
Thread-aware Preact Signals integration for ReactLynx.
import { signal, useSignal } from '@lynx-js/react-signals';The ReactLynx build keeps Signals reactive on the background thread and uses static values during main-thread first-screen rendering.
Reading Signals in JSX
ReactLynx does not currently support consuming a Signal directly in JSX. Read
its value through .value instead:
<text>Value: {count.value}</text>;Reading signal.value while rendering a component subscribes that component to
the Signal. When the value changes, the subscribed component re-renders.
