0.6.32 • Published 4 years ago

@heartfulnessinstitute/gatsby-plugin-hfn-profile v0.6.32

Weekly downloads
228
License
MIT
Repository
github
Last release
4 years ago

@heartfulnessinstitute/gatsby-plugin-hfn-profile

A Gatsby plugin for react-redux with built-in server-side rendering support, mysrcm login and profile apis

Install

npm install --save @heartfulnessinstitute/gatsby-plugin-hfn-profile redux-firestore react-redux-firebase react-redux redux firebase react-firebaseui

How to use

./src/state/rootReducer.js // same path you provided in gatsby-config

function reducer(state = initialState, action) {
  //...
  switch (action.type) {
    // case SET_A:
    //  return {...state, a: action.value}
    // ...
    default:
      return state
  }
}

export default reducer

./gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-hfn-profile`,
      options: {
        // [required] - path to your rootReducer module
        pathToRootReducerModule: "./src/state/rootReducer",
        // [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__",
      },
    },
  ],
}

License

MIT

0.6.32

4 years ago

0.6.31

4 years ago

0.6.29

4 years ago

0.6.28

4 years ago

0.6.25

4 years ago

0.6.27

4 years ago

0.6.26

4 years ago

0.6.30

4 years ago

0.6.21

4 years ago

0.6.20

4 years ago

0.6.23

4 years ago

0.6.22

4 years ago

0.6.7

4 years ago

0.6.6

4 years ago

0.6.9

4 years ago

0.6.8

4 years ago

0.6.24

4 years ago

0.6.10

4 years ago

0.6.12

4 years ago

0.6.11

4 years ago

0.6.18

4 years ago

0.6.17

4 years ago

0.6.19

4 years ago

0.6.14

4 years ago

0.6.13

4 years ago

0.6.16

4 years ago

0.6.15

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.5

4 years ago

0.6.4

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.20

4 years ago

0.5.19

4 years ago

0.5.18

4 years ago

0.5.17

4 years ago

0.5.16

4 years ago

0.5.15

4 years ago

0.5.14

4 years ago

0.5.11

4 years ago

0.5.12

4 years ago

0.5.13

4 years ago

0.5.10

4 years ago

0.5.8

4 years ago

0.5.9

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.30

4 years ago

0.3.29

4 years ago

0.3.28

4 years ago

0.3.27

4 years ago

0.3.26

4 years ago

0.3.25

4 years ago

0.3.24

4 years ago

0.3.23

4 years ago

0.3.22

4 years ago

0.3.21

4 years ago

0.3.17

4 years ago

0.3.16

4 years ago

0.3.20

4 years ago

0.3.19

4 years ago

0.3.15

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.2

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.0

4 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.0

5 years ago