Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No mention of the <SlateProvider> anywhere #4479

Closed
mihainsto opened this issue Aug 30, 2021 · 1 comment · Fixed by #4493
Closed

No mention of the <SlateProvider> anywhere #4479

mihainsto opened this issue Aug 30, 2021 · 1 comment · Fixed by #4493

Comments

@mihainsto
Copy link

`The \`useSlate\` hook must be used inside the <SlateProvider> component's context.`

Hello, I think this error isn't explained well, I can't find any SlateProvider. I tried to import the provider but there is nowhere to be found, I can't find any mention also in the repo, it does not exist any provider named

<SlateProvider> </SlateProvider>

@gitcatrat
Copy link

This is probably a leftover name of old API, currently all the contexts are in Slate component.

https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/slate.tsx#L72-L78

I.e in this one that wraps your editor:
import { Slate } from 'slate-react';

dylans added a commit that referenced this issue Sep 7, 2021
dylans added a commit that referenced this issue Sep 7, 2021
* Update error message for useSlate

fixes #4479

* Add changeset
dylans added a commit to dylans/slate that referenced this issue Sep 13, 2021
* Update error message for useSlate

fixes ianstormtaylor#4479

* Add changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants