This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { combineReducers } from 'redux'; | |
export default combineReducers({ | |
users: (state=[], action) => state | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
createStore, | |
applyMiddleware, | |
compose | |
} from 'redux'; | |
// root reducer | |
import rootReducer from './rootReducer'; | |
// redux devtools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App/App'; | |
import configureStore from './store'; | |
import { Provider } from 'react-redux'; | |
import './index.css'; | |
const store = configureStore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function* rootSaga() { | |
yield [ | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createSagaMiddleware from 'redux-saga'; | |
// code | |
// root reducer | |
import rootReducer from './rootReducer'; | |
// root saga | |
import rootSaga from './rootSaga'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App/App'; | |
import './index.css'; | |
ReactDOM.render( | |
<App />, | |
document.getElementById('root') | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add react-redux-firebase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { combineReducers } from 'redux'; | |
import { firebaseStateReducer } from 'react-redux-firebase' | |
export default combineReducers({ | |
firebase: firebaseStateReducer | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createSagaMiddleware from 'redux-saga'; | |
import { reactReduxFirebase } from 'react-redux-firebase'; | |
import { | |
createStore, | |
applyMiddleware, | |
compose | |
} from 'redux'; | |
// root reducer | |
import rootReducer from './rootReducer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { firebaseConnect } from 'react-redux-firebase' | |
import { pathToJS, dataToJS } from 'react-redux-firebase' | |
import { connect } from 'react-redux'; | |
import AppComponent from './AppComponent'; | |
const App = ({firebase, auth}) => { |