From 723fde1ccebb68c5d1e8320e7fa072c51710b92e Mon Sep 17 00:00:00 2001 From: deam Date: Sun, 2 Sep 2018 19:16:03 +0200 Subject: [PATCH] Added more about JS injection when doing SSR rehydration --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dd8ba09..9ce24d5 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,9 @@ On the server: Instead of doing `store.getState()` you will just use `getGlobalS On the client: Instead of doing `createStore(counterApp, preloadedState)` you can do `replaceGlobalState(preloadedState)` +Keep in mind that trying to do SSR rehydration can introduce JS injections if you don't do it right. + +The Redux guide solves it by doing `JSON.stringify(preloadedState).replace(/