Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR not working #1777

Closed
1 task
41319 opened this issue Jul 27, 2021 · 1 comment
Closed
1 task

SSR not working #1777

41319 opened this issue Jul 27, 2021 · 1 comment

Comments

@41319
Copy link

41319 commented Jul 27, 2021

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

  • React:
  • ReactDOM/React Native:
  • Redux:
  • React Redux:

What is the current behavior?

Hi SSR is not working when I enable the redux in gatsby-config

{
  resolve: `gatsby-plugin-react-redux-persist`,
  options: {
    // [required] - path to your createStore module
    pathToCreateStoreModule: "./src/state/createStore",
    // [optional] - options passed to `serialize-javascript`
    // info: https://github.com/yahoo/serialize-javascript#options
    // will be merged with these defaults:
    serialize: {
      space: 0,
      // if `isJSON` is set to `false`, `eval` is used to deserialize redux state,
      // otherwise `JSON.parse` is used
      isJSON: true,
      unsafe: false,
      ignoreFunction: true,
    },
    // [optional] - if true will clean up after itself on the client, default:
    cleanupOnClient: true,
    // [optional] - name of key on `window` where serialized state will be stored, default:
    windowKey: "__PRELOADED_STATE__",
  },
},

What is the expected behavior?

SSR should work

Which browser and OS are affected by this issue?

No response

Did this work in previous versions of React Redux?

  • Yes
@timdorr
Copy link
Member

timdorr commented Jul 27, 2021

This isn't a React Redux bug.

@timdorr timdorr closed this as completed Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants