Isaac
Isaac

Reputation: 1401

React server-side rendering - what is the performance impact of producing different html server-side to client-side?

If your serverside rendered html is slightly different to what's rendered client-side, you'll see some warnings in the console about it. What exactly is the performance impact of this on React? Does it matter? Or is it negligible?

Upvotes: 1

Views: 147

Answers (1)

mpospelov
mpospelov

Reputation: 1549

From my practice it’s negligible.

The idea of react hydrate that it takes the server-side generated DOM and try to reuse it on maximum.

If there is a miss-match react have to render it on client side again, it’s not a big problem especially if its only the issue for deeply nested nodes.

Here is nice article on medium, check it ;)

Upvotes: 2

Related Questions