omniscient-mixins

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i omniscient-mixins

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mikaelb
  • torgeir