Refactor store actions from single object to extra functions
[MAILPOET-2450]
This commit is contained in:
committed by
Jack Kitterhing
parent
1c418755af
commit
cb68de4384
@@ -1,14 +1,14 @@
|
|||||||
export default {
|
|
||||||
toggleSidebar(toggleTo) {
|
export function toggleSidebar(toggleTo) {
|
||||||
return {
|
return {
|
||||||
type: 'TOGGLE_SIDEBAR',
|
type: 'TOGGLE_SIDEBAR',
|
||||||
toggleTo,
|
toggleTo,
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
changeFormName(name) {
|
|
||||||
|
export function changeFormName(name) {
|
||||||
return {
|
return {
|
||||||
type: 'CHANGE_FORM_NAME',
|
type: 'CHANGE_FORM_NAME',
|
||||||
name,
|
name,
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
};
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { registerStore } from '@wordpress/data';
|
import { registerStore } from '@wordpress/data';
|
||||||
import actions from './actions.jsx';
|
import * as actions from './actions.jsx';
|
||||||
import createReducer from './reducer.jsx';
|
import createReducer from './reducer.jsx';
|
||||||
import selectors from './selectors.jsx';
|
import selectors from './selectors.jsx';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user