cjolowicz / muckr-web

Web app for muckr
https://muckr-web.herokuapp.com
MIT License
0 stars 0 forks source link

Avoid warning about `useLayoutEffect` used in SSR #98

Closed cjolowicz closed 5 years ago

cjolowicz commented 5 years ago
 PASS  src/server/__tests__/app.js (5.627s)
  ● Console

    console.error node_modules/react-dom/cjs/react-dom-server.node.development.js:105
      Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://fb.me/react-uselayouteffect-ssr for common fixes.
          in ConnectFunction
          in ConnectFunction
          in Context.Provider
          in Context.Consumer
          in Route
          in Context.Consumer
          in Switch
          in Routes
          in Fragment
          in App
          in Context.Provider
          in Provider
          in MuiThemeProviderOld
          in JssProvider
          in Context.Provider
          in Router
          in StaticRouter
          in ServerRoot

(warning repeated many times)

cjolowicz commented 5 years ago

The warning started with this commit:

* 259d2de Upgrade to react-testing-library 6.1.2