title: ReactDOM passing a function with parameters to a child component
body: <p>I'm programming in React for the first time and I have a problem which I don't understand how I can solve without change everything, but it feels like there must be a solution.</p>
  
  <p>I have this code at the index.js</p>
  
  <pre><code>export var updateString = function (test3){
      var test1 = 'hello world1'
      //do something mother
  }
  
  ReactDOM.render(&lt;Child triggerUpdateString={() =&gt; updateString ('hello world3')}/&gt;, document.getElementById('child'));
  </code></pre>
  
  <p>And then I got the following code at child.js</p>
  
  <pre><code>export default class Child extends React.Component {
    handleString = event =&gt; {
      event.preventDefault()
      this.props.triggerUpdateString('hello world2')
      //do something child }}
  </code></pre>
  
  <p>I do not have a problem to get 'hello world1' or 'hello world3' in the "do something mother" part but I cannot get the 'hello world2' string. </p>
  
  <p>How do I get the string from the child up to the updateString function?</p>