Skip to content

Commit

Permalink
docs: fix code example typo in reactivity.md (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seemspyo authored Mar 7, 2025
1 parent bedd7e6 commit f953ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/framework/react/guides/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ While it IS possible to omit the selector, resist the urge as omitting it would
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.

```tsx
<form.Subscribe>
<form.Subscribe
selector={(state) => state.firstName}
children={(firstName) => (
<form.Field>{(field) => <input name="lastName" value={field.state.lastName} onChange={field.handleChange}/></form.Field>
)}
</form.Subscribe>
/>
```

> The `form.Subscribe` component doesn't trigger component-level re-renders. Anytime the value subscribed to changes, only the `form.Subscribe` component re-renders.
Expand Down

0 comments on commit f953ec8

Please sign in to comment.