The idea is to use nextjs "getInitialProps" on the App root component. There we make the calculations, those get serialized and later passed onto the client as well.
Note:
I removed local storage serialization. It wasn't working, and it feels like with randomize on load, it shouldn't be necessary. Will code it back in if that's not the case
With this PR, the error pop-up went away, and everything matches for the first couple of loads. But after some hot-reloaded JS code changes, the dangerouslySetInnerHTML prop was getting a React warning about SSR mismatch. I added (suppressHydrationWarning={true}) as I couldn't figure out the issue
The idea is to use nextjs "getInitialProps" on the App root component. There we make the calculations, those get serialized and later passed onto the client as well.
Note:
dangerouslySetInnerHTML
prop was getting a React warning about SSR mismatch. I added (suppressHydrationWarning={true}) as I couldn't figure out the issue