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

Renders empty html on client side until hydration is done #4

Closed
Pranab16 opened this issue Jul 10, 2020 · 1 comment
Closed

Renders empty html on client side until hydration is done #4

Pranab16 opened this issue Jul 10, 2020 · 1 comment

Comments

@Pranab16
Copy link

Won't this code render empty html?

<section
          ref={rootRef}
          dangerouslySetInnerHTML={{ __html: "" }}
          suppressHydrationWarning
          {...wrapperProps}
        />
@valcol
Copy link
Owner

valcol commented May 14, 2021

No, this will keep the DOM rendered server-side when used with ReactDOM.hydrate.

@valcol valcol closed this as completed May 14, 2021
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

No branches or pull requests

2 participants