Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ReactDOM.hydrate with ClientOnly #521

Closed
@igorroch

Description

@igorroch

There is a console error when we try to render component with parameter clientOnly: true

react-dom.development.js:894 Warning: Expected server HTML to contain a matching <div> in <div>.

@Html.React("ReactWorld", new { name = "World" }, clientOnly: true)

Minimal repo to reproduce: https://github.com/igorroch/React.NET-issue-521

https://stackoverflow.com/questions/46443652/react-16-warning-expected-server-html-to-contain-a-matching-div-in-body
says that "If your application is not ssr, please use ReactDOM.render to start"

But now RenderJavaScript() uses only ReactDOM.hydrate for all components.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions