Skip to content

Instantly share code, notes, and snippets.

@ar5had
Forked from alexeisavca/ReactIgnore
Created July 25, 2017 14:45
Show Gist options
  • Save ar5had/5c13dad95bfe6f3b8ce41b846cd38f7d to your computer and use it in GitHub Desktop.
Save ar5had/5c13dad95bfe6f3b8ce41b846cd38f7d to your computer and use it in GitHub Desktop.

Revisions

  1. @alexeisavca alexeisavca revised this gist Dec 28, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ReactIgnore
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    var React = require('react/addons');
    var ReactIgnore = {
    displayName: 'ReactIgnore',
    shouldComponentUpdate: function (){
    shouldComponentUpdate (){
    return false;
    },

    render: function (){
    render (){
    return React.Children.only(this.props.children);
    }
    };
  2. @alexeisavca alexeisavca created this gist Dec 28, 2014.
    16 changes: 16 additions & 0 deletions ReactIgnore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    var React = require('react/addons');
    var ReactIgnore = {
    displayName: 'ReactIgnore',
    shouldComponentUpdate: function (){
    return false;
    },

    render: function (){
    return React.Children.only(this.props.children);
    }
    };

    module.exports = {
    Class: ReactIgnore,
    Component: React.createClass(ReactIgnore)
    };