API Design


React State Custom (RSC) exposes a minimal and intuitive API centered on standard React hooks. The primary usage pattern is:



function useCounterState() {
const [count, setCount] = useState(0);
const increment = () => setCount(c => c + 1);
const decrement = () => setCount(c => c - 1);
return { count, increment,...