Replies: 1 comment
-
|
https://app.slack.com/client/T1RFVK5FV/C1RH7AXSS/thread/C1RH7AXSS-1686558994.038029 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in
slate-react/src/hooks/use-slate-static.tsxand
slate-react/src/hooks/use-slate.tsxThey all have the same return value type
Editor(from slate).I found that
useSlateis more used for editor example, likesite/examples/richtext. AnduseSlateStaticis more used for editor itself, likeslate-react/src/components/leaf.tsx.But sometimes it doesn't follow this pattern:
Editor internal components
slate-react/src/components/editable.tsxuseuseSlateEditor example
site/examples/images.tsxuseuseSlateStaticSo why are these two hooks distinguished?
Beta Was this translation helpful? Give feedback.
All reactions