simple-redux-form
Version:
This is simplest redux form
38 lines (32 loc) • 747 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.initialize = initialize;
exports.setField = setField;
exports.touchAll = touchAll;
exports.destroy = destroy;
var _actionTypes = require('./actionTypes');
function initialize(initialValue, form, fields) {
return {
type: _actionTypes.INITIALIZE,
initialValue: initialValue,
form: form,
fields: fields
};
}
function setField(field, value, form) {
return {
type: _actionTypes.SET_FIELD, field: field, value: value, form: form
};
}
function touchAll(form, fields) {
return {
type: _actionTypes.TOUCH_ALL, form: form, fields: fields
};
}
function destroy(form) {
return {
type: _actionTypes.DESTROY, form: form
};
}