Since upgrading to React 16 I get this error message:
warning.js:33 Warning: Expected server HTML to contain a matching
I'm assuming you are using ssr. The warning is about attempting to render before there is a window object. You need to hydrate.
ReactDOM.hydrate(<App />, document.getElementById("home"))
What I don't understand, is that the App component is being served static by express. Why is it trying to render before it is served? Bring on the comments.
If you use ReactDOM.hydrate
to start web application, you will see this warning.
If your application does not use server-side rendering (ssr
), please use ReactDOM.render
to start.