Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A simple component to make ReactJs ignore subtrees
var React = require('react/addons');
var ReactIgnore = {
displayName: 'ReactIgnore',
shouldComponentUpdate (){
return false;
render (){
return React.Children.only(this.props.children);
module.exports = {
Class: ReactIgnore,
Component: React.createClass(ReactIgnore)
Copy link

janjachacz commented Jul 3, 2015

Such a simple solution!! Thanks a lot, it saved me a lot of hassle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment