Skip to content

bug(examples): SSR recipe is using old API (store.firebase is undefined) #815

Open
@lesmo

Description

@lesmo

What is the current behavior?

Following the SSR recipe, the store.firebase property is undefined and thus it's not possible to follow it:

import { createStore, applyMiddleware, combineReducers } from 'redux';
import { firebaseReducer } from 'react-redux-firebase'
import { firestoreReducer } from 'redux-firestore';
import reduceReducers from 'reduce-reducers';

const reducers = combineReducers({
  firebase: firebaseReducer,
  firestore: firestoreReducer,
  local: reduceReducers([... someReducers])
});

const store = createStore(persistedReducer, initialState);
store.firebase // <- undefined
store.firestore // <- undefined

I'm trying to get this to work under Razzle/Express. I understand that both firebase and firestore won't be defined at this point (after all we're just setting up reducers here), but I've found no pointers as to when or where are these ever defined or how to get react-redux-firebase to define them.

What is the expected behavior?
store.firestore and store.firebase to not be undefined, or documentation to be more clear about when or how these are set...

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

{
  "redux": "^4.0.4",
  "react-redux-firebase": "^3.0.6",
  "redux-firestore": "^0.11.0",
  "reduce-reducers": "^1.0.4",
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions