1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-16 13:09:31 +01:00

Fix docs on useSlateSelector

This commit is contained in:
Sunny Hirai 2024-12-30 21:35:10 -08:00
parent aecc957a9e
commit 6aace0d017

View File

@ -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.