Skip to content

Commit f953ec8

Browse files
authored
docs: fix code example typo in reactivity.md (#1230)
1 parent bedd7e6 commit f953ec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/framework/react/guides/reactivity.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ While it IS possible to omit the selector, resist the urge as omitting it would
3131
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.
3232

3333
```tsx
34-
<form.Subscribe>
34+
<form.Subscribe
3535
selector={(state) => state.firstName}
3636
children={(firstName) => (
3737
<form.Field>{(field) => <input name="lastName" value={field.state.lastName} onChange={field.handleChange}/></form.Field>
3838
)}
39-
</form.Subscribe>
39+
/>
4040
```
4141

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

0 commit comments

Comments
 (0)