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) {
|
||||
return {
|
||||
type: 'TOGGLE_SIDEBAR',
|
||||
toggleTo,
|
||||
};
|
||||
},
|
||||
changeFormName(name) {
|
||||
return {
|
||||
type: 'CHANGE_FORM_NAME',
|
||||
name,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export function toggleSidebar(toggleTo) {
|
||||
return {
|
||||
type: 'TOGGLE_SIDEBAR',
|
||||
toggleTo,
|
||||
};
|
||||
}
|
||||
|
||||
export function changeFormName(name) {
|
||||
return {
|
||||
type: 'CHANGE_FORM_NAME',
|
||||
name,
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { registerStore } from '@wordpress/data';
|
||||
import actions from './actions.jsx';
|
||||
import * as actions from './actions.jsx';
|
||||
import createReducer from './reducer.jsx';
|
||||
import selectors from './selectors.jsx';
|
||||
|
||||
|
Reference in New Issue
Block a user