Capítulo 14 de 29
Nothing re-renders automatically — every component that needs form/field state must explicitly subscribe via useSelector(form.store, selector) or form.Subscribe, and omitting the selector function defeats the entire point.
useSelector(form.store, selector): for reading a value inside component logic (e.g. to compute something, not just render it) — re-renders the calling component when the selected slice changes.form.Subscribe: for UI reactivity — an isolated component that re-renders itself only, not its parent, ideal for "show this piece of state right here."useStore is deprecated in favor of useSelector with the same argument shape — a drop-in rename during migration.// Logic-based: needed inside a calculation/condition
const firstName = useSelector(form.store, (state) => state.values.firstName)
// UI-based: isolated re-render, doesn't touch the parent
<form.Subscribe
selector={(state) => state.values.firstName}
children={(firstName) => <div>{firstName}</div>}
/>
firstName" intent expressed both ways — pick useSelector when you need the value in surrounding logic, form.Subscribe when you're only using it to render a small piece of UI.form.Subscribe over useSelector specifically to keep a re-render local, e.g. inside a large form where the parent must stay stable.useStore, it's safe to mechanically rename to useSelector — the argument shape didn't change.