Skip to content

Instantly share code, notes, and snippets.

@hedgerh
Last active January 22, 2019 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgerh/df54ce99bf8f596fe09dec2fa0002e40 to your computer and use it in GitHub Desktop.
Save hedgerh/df54ce99bf8f596fe09dec2fa0002e40 to your computer and use it in GitHub Desktop.
import store from './store'
export default class HttpClient {
getUser() {
const token = store.getState()
// fetch and pass along your token
}
}
import { combineReducers, createStore } from 'redux'
import { authReducer, userReducer, exampleReducer } from './reducers'
const reducer = combineReducers({
auth: authReducer,
user: userReducer,
example: exampleReducer,
})
export default createStore(reducer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment