ReactJs Pass argument from component to component
<p>I am still learning ReactJs and I stumbled upon a problem. I have rendered Header Content and Footer as different components. And when user logs in in ComponentDidMount of Content I get Json with his name, surname etc.. And when I receive the data I would like to add users name to header like Welcome, <code>username</code> . But I dont know how to pass that or where so that the component Header gets the name.</p>

<p><strong>Index</strong></p>

<pre><code>render: function() {

if(this.state.signup == true) {
  return  (
    &lt;div&gt;
    &lt;Header data = {this.state.signup} logout={this.logOut}/&gt;
    &lt;MenuBar/&gt;
      &lt;Content/&gt;
     &lt;Footer/&gt;
    &lt;/div&gt;
  );
} else {
  return  (
    &lt;div&gt;
     &lt;Header data = {this.state.signup}/&gt;
    &lt;MenuBar/&gt;
      &lt;Login func={this.logIn}/&gt;
      &lt;Footer/&gt;
    &lt;/div&gt;
  );
}
},
</code></pre>

<p>So if user is logged in the states changes to true. And that opens Content.
Here I get userdata </p>

<p><strong>Content</strong></p>

<pre><code>componentDidMount: function() {
document.title = "Dashboard";
this.getUser();

 },

 getUser: function(){
 $.getJSON(url, this.handleData);
},

handleData: function(data){
 this.setState({data: data});
 },
</code></pre>

<p>And now when this happens I would like to change the header with Welcome, <code>Name of the user</code> from Json.</p>

<p><strong>Header</strong></p>

<pre><code>render() {
if(this.props.data) //Check if user is logged in
{
  return (
  &lt;section className="heading"&gt;
            &lt;div className="user-message"&gt;Welcome, User&lt;/div&gt; //Here i would like to change user name from Json         
  &lt;/section&gt; 
);

 }
else{
  return (
        &lt;section className="heading"&gt;
            &lt;div className="user-message"&gt;You are not connected&lt;/div&gt;
        &lt;/section&gt;
  );
</code></pre>

<p>I dont know if I understood ReactJs completely so I might went into the wrong direction.</p>

<p>So how should I change the name? I thought about moving Header To Content And pass from there, but is there a better way?</p>