1.0.1 • Published 10 years ago

omniscient-mixins v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

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!');
});