Skip to content

Instantly share code, notes, and snippets.

@mikaelbr
Created October 24, 2014 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelbr/1ed0189021ba45d0fd42 to your computer and use it in GitHub Desktop.
Save mikaelbr/1ed0189021ba45d0fd42 to your computer and use it in GitHub Desktop.
Example shouldComponentUpdate
var component = require('omniscient');
var React = require('react');
var someOtherMixins = require('./someMixins');
var setup = {
componentDidMount: function () {
// Some setup.
event.on('data', console.log.bind(console)));
}
};
module.exports = component([ setup, someOtherMixins ], function (cursor) {
return React.div.h1({}, cursor.get('title'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment