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
-
in
slate-react/src/hooks/use-slate-static.tsx
and
slate-react/src/hooks/use-slate.tsx
They all have the same return value type
Editor
(from slate).I found that
useSlate
is more used for editor example, likesite/examples/richtext
. AnduseSlateStatic
is 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.tsx
useuseSlate
Editor example
site/examples/images.tsx
useuseSlateStatic
So why are these two hooks distinguished?
Beta Was this translation helpful? Give feedback.
All reactions