Last active
December 4, 2017 16:13
-
-
Save MicroBenz/0e3aa5493b7d618b2e33eb4c8c9e2ba6 to your computer and use it in GitHub Desktop.
YWC15
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
// เอาไปสร้าง reducers | |
import { combineReducers } from 'redux'; | |
import widgets from './ducks/widgets'; | |
import auth from './ducks/auth'; | |
const rootReducer = combineReducers({ auth, widgets }); | |
export default rootReducer; | |
// เอาไป bind action กับ component | |
import * as widgetActions from './ducks/widgets'; | |
// หรือ import เรียงอัน | |
import {loadWidgets, createWidget, updateWidget, removeWidget} from './ducks/widgets'; | |
// ... | |
bindActionCreators({loadWidgets, createWidget, updateWidget, removeWidget}, dispatch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment