<script nonce="xxxxx" id="initial-data" type="text/plain" data-json="${preloadedState}" ></script> このpreloadedStateはエスケープ処理が必要なので注意してください。 クライアント側の読み込み方 const initialData = JSON.parse( document.getElementById("initial-data")!.getAttribute("data-json")!, ); const { store } = configureStore(initialData); https://github.com/hiroppy/ssr-sample/blob/master/src/client/index.tsx#L21-L22 useEffect SSR では、
![SPA + SSR + PWA の作り方とセキュリティについて - hiroppy's site](https://cdn-ak-scissors.b.st-hatena.com/image/square/462a510575d6018d798ad846ff80b1d26a37c388/height=288;version=1;width=512/https%3A%2F%2Fhiroppy.me%2Fblog%2Fssr-sample-2%2Fog.png)