Created
February 22, 2018 18:52
-
-
Save aduth/9ee98fb814f37a33ac4fb95c40e985c7 to your computer and use it in GitHub Desktop.
registerStore
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
/** | |
* WordPress dependencies | |
*/ | |
import { registerStore } from '@wordpress/data'; | |
/** | |
* Internal dependencies | |
*/ | |
import reducer from './reducer'; | |
import * as actions from './actions'; | |
import * as selectors from './selectors'; | |
export default registerStore( 'core/viewport', { | |
reducer, | |
actions, | |
selectors, | |
} ); |
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
/** | |
* WordPress dependencies | |
*/ | |
import { | |
registerReducer, | |
registerActions, | |
registerSelectors, | |
} from '@wordpress/data'; | |
/** | |
* Internal dependencies | |
*/ | |
import reducer from './reducer'; | |
import * as actions from './actions'; | |
import * as selectors from './selectors'; | |
const store = registerReducer( 'core/viewport', reducer ); | |
registerSelectors( 'core/viewport', selectors ); | |
registerActions( 'core/viewport', actions ); | |
export default store; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment