Closed cmdcolin closed 3 years ago
@cmdcolin https://github.com/mobxjs/mobx-react#server-side-rendering-with-enablestaticrendering
@mweststrate Looks like it has slipped up from the main docs after all.
Thanks, that definitely makes sense. I'll close for now
ps: I know this is just crazy but we actually do what is done in the codesandbox e.g. ssr on the client side (sometimes in a web worker, sometimes in the main thread, but we may have to stop the main thread ssr'ing)
I'd swear I wrote docs on it, but missed something else already as well. I guess I messed up a docs merge somewhere
Added to the main docs as well
We currently perform SSR and have the SSR'd component wrapped in an observer. It produces a warning message about useLayoutEffect being used on the server side
This a crazy little codebox that might demonstrate what we're seeing
https://codesandbox.io/s/hidden-sun-2wnte?file=/src/App.js
The console warnings are
This came from updating mobx-react/mobx-react-lite from and getting the useQueuedForceUpdate new-ness, which looked good, but seems like it triggers this warning
Had mobx-react-lite@2.0.7 now on mobx-react-lite@2.2.2