Created
October 19, 2018 21:49
-
-
Save edoantonioco/4bef750268a6bb19dbb52e48b4ea84f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//store/index.js | |
import { createStore} from 'redux' | |
import reducers from './reducers' | |
const store = createStore(reducers) | |
export default store |
This file contains hidden or 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
//store/reducers/index.js | |
import { combineReducers} from 'redux' | |
import login from './login_reducer' | |
export default combineReducers({ | |
login | |
}) |
This file contains hidden or 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
//store/reducers/login_reducers.js | |
export default reducer = (state = [], action) => { | |
if (action.type === 'LOGIN_RESULT') { | |
return action | |
} | |
return state | |
} | |
const action = { | |
type: "LOGIN_RESULT", | |
sessionID: action.sessionID, | |
mensajeError: action.mensajeError | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment