1.0.1 • Published 10 years ago
omniscient-mixins v1.0.1
Collection of Omniscient and Immstruct mixins
swapProps
A short-cut for deep merging on the current cursor for Omniscient.
var swapProps = require('omniscient-mixins/mixins/swapProps');
var otherMixins = {
// Some evented callback or similar
handleSubmit: function () {
this.swapProps({
property: 'value'
});
}
};
var Component = component([otherMixins, swapProps], function (cursor, static) {
return React.DOM.h1({}, 'Hello World!');
});