Skip to content

Commit

Permalink
[docs] Fix composition render prop example for internalState naming (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ericchernuka authored Dec 18, 2024
1 parent 350c6e7 commit 2022f01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/data/getting-started/usage/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Using a function gives you complete control over spreading props and allows you

```jsx
<Switch.Thumb
render={(props, internalState) => (
<span {...props}>{internalState.checked ? <CheckedIcon /> : <UncheckedIcon />}</span>
render={(props, state) => (
<span {...props}>{state.checked ? <CheckedIcon /> : <UncheckedIcon />}</span>
)}
/>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you are working in an extremely performance-sensitive application, you might
```tsx title="switch.tsx"
<Switch.Thumb
render={(props, state) => (
<span {...props}>{internalState.checked ? <CheckedIcon /> : <UncheckedIcon />}</span>
<span {...props}>{state.checked ? <CheckedIcon /> : <UncheckedIcon />}</span>
)}
/>
```
Expand Down

0 comments on commit 2022f01

Please sign in to comment.