title: React.js how to make a correct callback prop function?
body: <p>Im working with a react.js app, and I remember that I was able to pass a callback function from a child to a parent with pops, the thing is I cant achieve to do this again (I'd like to keep it simple, without Flux libraries):</p>
  
  <p>So my parent <code>App</code>:</p>
  
  <pre><code>class App extends Component {
    constructor(props) {
     super(props);
   }
  
   showViewAction(viewToShow){
     console.log(viewToShow);
   }
  
    render() {
      return (
        &lt;div&gt;
          &lt;AppMenu showView={this.showViewAction}/&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>And my child <code>AppMenu</code>:</p>
  
  <pre><code>class AppMenu extends Component{
  
    constructor(props) {
     super(props);
   }
  
    showCirculares(){
      this.props.showView("circulares");
    }
  
    render(){
  
      return(
      &lt;div&gt;
        &lt;MenuButton onClick={this.showCirculares} buttonTitle="SomeOtherProp"/&gt;
      &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>Everything I try, I always get:</p>
  
  <blockquote>
    <p>Cannot read property 'props' of undefined at showCirculares;</p>
  </blockquote>
  
  <p>I know this will be resolved with a simple task, and that this is basic React.js stuff, its just that I cant find a solution for this!! What am I doing wrong?</p>