-
Notifications
You must be signed in to change notification settings - Fork 808
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
[SerializerHtml] Remove renderToStaticMarkup
from client code
#3149
[SerializerHtml] Remove renderToStaticMarkup
from client code
#3149
Conversation
@dimaanj is attempting to deploy a commit to the Udecode Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: e634e69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this change affect the ability for serializeHtml
to work in non-browser environments?
Do we really expose
Now, since we use client react api to render, |
I see, that jest env might need server context. I will check test failures |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
We don't have access to |
Breaking support for non-browser environments is likely going to be a problem for many users. Do you think it would be possible to create separate client and server versions of the serialize HTML package? @zbeyens attempted something like that for the Plate core package as part of an attempt to work around a Next.js bug. https://github.com/udecode/plate/pull/3125/files |
It's actually hydrated client side code in the issue related to nextjs. We can't use state, hooks, react context and browser apis inside server components in nextjs. But in client components which hydrated in the browser it works like a normal react SPA app. See more here So, both issues about incorrect usage of Even, if anyone will call |
Summary
Fixes #1123
Fixes #1047
Related issue on slate ianstormtaylor/slate#5012
See react APIs update for more details
renderToStaticMarkup
from client code