Skip to content

Markup different on the server and the client #149

@ile

Description

@ile

I'm new with MERN, so not sure if I'm doing something wrong.... but, I get this:

warning.js?8a56:44Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) " data-reactid="1"><div data-reactid="2"
 (server) " data-reactid="1"><!-- react-empty: 2 -

Seems like the markup is otherwise the same, but there is this extra comment <!-- react-empty: 2 --> just after <div data-reactroot="" data-reactid="1" data-react-checksum="1358521740">, on the server side.

This seems to happen if I create the project with mern executable and use that and also if I clone the 2.0 branch and use that...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions