Skip to content

Commit

Permalink
Fix docs on useSlateSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
thesunny committed Dec 31, 2024
1 parent aecc957 commit 6aace0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/libraries/slate-react/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Get the current editor object from the React context. A version of useSlate that

Get the current editor selection from the React context. Only re-renders when the selection changes.

#### `useSlateSelector<T>(selector: (editor: Editor): T, equalityFn?: (a: T, b: T) => boolean): T`
#### `useSlateSelector<T>(selector: (editor: Editor) => T, equalityFn?: (a: T, b: T) => boolean): T`

Similar to `useSlateSelection` but uses redux style selectors to prevent rerendering on every keystroke.

Expand Down

0 comments on commit 6aace0d

Please sign in to comment.