0.6.32 • Published 3 years ago

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

Weekly downloads
228
License
MIT
Repository
github
Last release
3 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

3 years ago

0.6.31

3 years ago

0.6.29

3 years ago

0.6.28

3 years ago

0.6.25

3 years ago

0.6.27

3 years ago

0.6.26

3 years ago

0.6.30

3 years ago

0.6.21

3 years ago

0.6.20

3 years ago

0.6.23

3 years ago

0.6.22

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.9

3 years ago

0.6.8

3 years ago

0.6.24

3 years ago

0.6.10

3 years ago

0.6.12

3 years ago

0.6.11

3 years ago

0.6.18

3 years ago

0.6.17

3 years ago

0.6.19

3 years ago

0.6.14

3 years ago

0.6.13

3 years ago

0.6.16

3 years ago

0.6.15

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.20

3 years ago

0.5.19

3 years ago

0.5.18

3 years ago

0.5.17

3 years ago

0.5.16

3 years ago

0.5.15

3 years ago

0.5.14

3 years ago

0.5.11

3 years ago

0.5.12

3 years ago

0.5.13

3 years ago

0.5.10

3 years ago

0.5.8

3 years ago

0.5.9

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.30

3 years ago

0.3.29

3 years ago

0.3.28

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.21

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.20

3 years ago

0.3.19

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.2

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.0

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.0

3 years ago