Skip to content

Commit

Permalink
Fix return types in "Editor hooks" docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TyMick committed Nov 8, 2024
1 parent a13c445 commit 214e939
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/libraries/slate-react/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ Get the current `selected` state of an element.

### Editor hooks

#### `useSlate(): ReactEditor`
#### `useSlate(): Editor`

Get the current editor object from the React context. Re-renders the context whenever changes occur in the editor.

#### `useSlateWithV(): { editor: ReactEditor, v: number }`
#### `useSlateWithV(): { editor: Editor, v: number }`

The same as `useSlate()` but includes a version counter which you can use to prevent re-renders.

#### `useSlateStatic(): ReactEditor`
#### `useSlateStatic(): Editor`

Get the current editor object from the React context. A version of useSlate that does not re-render the context. Previously called `useEditor`.

Expand Down

0 comments on commit 214e939

Please sign in to comment.