Refactor store actions from single object to extra functions

[MAILPOET-2450]
This commit is contained in:
Rostislav Wolny
2019-10-24 17:22:53 +02:00
committed by Jack Kitterhing
parent 1c418755af
commit cb68de4384
2 changed files with 15 additions and 15 deletions

View File

@@ -1,14 +1,14 @@
export default {
toggleSidebar(toggleTo) {
export function toggleSidebar(toggleTo) {
return {
type: 'TOGGLE_SIDEBAR',
toggleTo,
};
},
changeFormName(name) {
}
export function changeFormName(name) {
return {
type: 'CHANGE_FORM_NAME',
name,
};
},
};
}

View File

@@ -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';