How to use the redux-firestore/lib/enhancer function in redux-firestore

To help you get started, we’ve selected a few redux-firestore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prescottprue / fireadmin / src / store / createStore.js View on Github external
firebase.initializeApp(config.firebase)
  }

  // if (window.Cypress) {
  //   firebase.functions().useFunctionsEmulator('http://localhost:5005');
  // }

  // ======================================================
  // Store Instantiation and HMR Setup
  // ======================================================
  const store = createStore(
    makeRootReducer(),
    initialState,
    compose(
      reactReduxFirebase(window.fbInstance || firebase, combinedConfig),
      reduxFirestore(window.fbInstance || firebase),
      applyMiddleware(...middleware),
      ...enhancers
    )
  )
  store.asyncReducers = {}

  // Setup hot module reloading to correctly replace reducers
  if (module.hot) {
    module.hot.accept('./reducers', () => {
      const reducers = require('./reducers').default
      store.replaceReducer(reducers(store.asyncReducers))
    })
  }

  return store
}

redux-firestore

Redux bindings for Firestore.

MIT
Latest version published 12 months ago

Package Health Score

70 / 100
Full package analysis