ctrlplusb / react-jobs

Asynchronously resolve data for your components, with support for server side rendering.
MIT License
166 stars 34 forks source link

React Warning of invalid checksum #37

Closed eneskaya closed 7 years ago

eneskaya commented 7 years ago

Hello, great package!

I am using react-universally of @ctrlplusb and integrated this package as I need SSR for one component/route where I need to set the meta tags for shareability (http://ogp.me)

Now, when I install everything I get following warning:

Warning: 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="9"><!-- react-empty: 10 
 (server) " data-reactid="9"><div style="min-heigh
printWarning @ warning.js:36
warning @ warning.js:60
_mountImageIntoNode @ ReactMount.js:507
mountComponentIntoNode @ ReactMount.js:112
perform @ Transaction.js:143
batchedMountComponentIntoNode @ ReactMount.js:126
perform @ Transaction.js:143
batchedUpdates @ ReactDefaultBatchingStrategy.js:62
batchedUpdates @ ReactUpdates.js:97
_renderNewRootComponent @ ReactMount.js:319
_renderSubtreeIntoContainer @ ReactMount.js:401
render @ ReactMount.js:422
(anonymous) @ index.js:50
Promise resolved (async)
renderApp @ index.js:50
(anonymous) @ index.js:54
__webpack_require__ @ bootstrap 0019787c688fbc872f3c:690
fn @ bootstrap 0019787c688fbc872f3c:111
Op @ firebase-browser.js:43
__webpack_require__ @ bootstrap 0019787c688fbc872f3c:690
Object.defineProperty.value @ bootstrap 0019787c688fbc872f3c:788
(anonymous) @ bootstrap 0019787c688fbc872f3c:788

Everything works as expected though, and honestly I can live with that, but still there's the itch in my brain that wants to find out why this is happening (I'm new to React on web, especially that universal stuff 😁 ). Would love an explanation on this!

eneskaya commented 7 years ago

nvm, found the error myself. Thanks for this awesome package!