title: Warning: _renderNewRootComponent(): Render methods should be a pure function of props and state;
body: <p>I try to run a class Buttons, with passing a value to method visibilityFilter(value){...} and get the error</p>
  
  <pre><code>Warning: _renderNewRootComponent(): Render methods should be a pure function of props and state; 
  triggering nested component updates from render is not allowed. 
  If necessary, trigger nested updates in componentDidUpdate. 
  Check the render method of Buttons.
  </code></pre>
  
  <p>My code is the following:   </p>
  
  <pre><code>class Buttons extends React.Component {
      visibilityFilter(value){
          let action = {type: 'set_visibility_filter',payload: {name: value, on: true}};
          store.dispatch(action);
      };
      render(){           
          return(
              &lt;div className="container-fluid"&gt;
                  &lt;div className="row"&gt;
                      &lt;div className="col-lg-4 col-md-4 col-sm-4 col-xs-0"&gt;
                          &lt;buttom type="button" className="m-t-1-em w-100 btn btn-info" onClick={this.visibilityFilter('favorite')} &gt;Favorite&lt;/buttom&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;              
              &lt;/div&gt;
          );
      };
  };  
  </code></pre>
  
  <p>What is the matter and how to pass a value to the method?</p>