1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-08 08:16:30 +02:00

Provide a more detailed description of useSlateSelector in docs

This commit is contained in:
Sunny Hirai
2023-04-13 09:13:19 -07:00
parent c6b7db2e13
commit cc2000b583

View File

@@ -44,7 +44,9 @@ Get the current editor selection from the React context. Only re-renders when th
Similar to `useSlateSelection` but uses redux style selectors to prevent rerendering on every keystroke.
Bear in mind rerendering can only prevented if the returned value is a value type or for reference types (e.g. objects and arrays) add a custom equality function.
Returns a subset of the full selection value based on the `selector`.
Bear in mind rerendering can only prevented if the returned value is a value type or for reference types (e.g. objects and arrays) add a custom equality function for the `equalityFn` argument.
Example: