Skip to content

Commit 0f181a2

Browse files
committed
Update to useSelectedIndex
1 parent 6a4babd commit 0f181a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/web/content/docs/concepts/utils.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ function MyLayout({
4848
}
4949
```
5050

51-
For more control over the selection, you can use the `useSelection` hook.
51+
For more control over the selection, you can use the `useSelectedIndex` hook.
5252

5353
```tsx my-layout.tsx -c
54-
import { useSelection } from "codehike/utils/selection"
54+
import { useSelectedIndex } from "codehike/utils/selection"
5555

5656
function MyLayout(...) {
57-
const [ selectedIndex, setSelectedIndex ] = useSelection()
57+
const [ selectedIndex, setSelectedIndex ] = useSelectedIndex()
5858
...
5959
}
6060
```

0 commit comments

Comments
 (0)