Phaze’s only state primitive is signal(). The rest of state management — context replacement, store grouping, derived state — composes out of where you declare it and what reactive primitives observe it. This page covers the primitive itself: its naming history across the signals lineage, and the one decision you make when using it.
That’s the entire decision tree. The mechanism is identical in both cases — what changes is where you write the line, and the JavaScript module / function scope handles the rest.
One decision: where you declare it
Where you declare it
Lifetime
What it replaces in React
Inside the component function
Disposed with the component scope
useState, useReducer
At module top level
Lives until page navigation
useContext, Redux, Zustand, Jotai, every store library
At module level, in a dedicated store.ts
Same, but grouped
A <StateProvider> tree + useStoreSelector machinery