Skip to content

Commit

Permalink
ci: apply automated fixes and generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Mar 5, 2025
1 parent 57722c9 commit 8d65213
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/framework/react/guides/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ The `useStore` hook is perfect when you need to access form values within the lo

```tsx
const firstName = useStore(form.store, (state) => state.values.firstName)
const errors = useStore(form.store, (state) => state.errorMap)
const errors = useStore(form.store, (state) => state.errorMap)
```


You can access any piece of the form state in the selector.

> Note, that `useStore` will cause a whole component re-render whenever the value subscribed to changes.
> Note, that `useStore` will cause a whole component re-render whenever the value subscribed to changes.
While it IS possible to omit the selector, resist the urge as omitting it would result in many unnecessary re-renders whenever any of the form state changes.


## form.Subscribe

The `form.Subscribe` component is best suited when you need to react to something within the UI of your component. For example, showing or hiding ui based on the value of a form field.
Expand Down

0 comments on commit 8d65213

Please sign in to comment.