v2.2.0
This release adds one new action and reverts changes made in v2.1.0:
setPaths
When one wants to set multiple values at the same time, setPaths is the way to do it.
Simple Example
store.dispatch(setPaths(
{ path: 'my.email', value: '[email protected]' },
{ path: 'my.name', value: 'John Smith' },
));
Complex Example
const prefix = ['my'];
const data = {
email: '[email protected]',
name: 'John Smith',
};
const pathValues = Object.keys(data).map(field => {
return { path: prefix.concat(field), value: data[field] };
});
store.dispatch(
setPaths.apply(this, pathValues)
);
This release also reverts all of the changes in v2.1.0. I misread the documentation and had it all wrong. I'm really sorry about that.