title: Passing data between React components with no child-parent relationship?
body: <p>I have two views that are being rendered in separate "tabs" in my application:</p>
  
  <p>In <strong>formA.tsx</strong> I have the first component that renders a view and stores the user inserted value in its state, and once the submit button is pressed, <code>submitForm()</code> is called:</p>
  
  <pre><code>class FormA extends React.Component&lt;any, any&gt;{
      public constructor(props){
          super(props);
          this.state={name:''}
      }
      private submitForm(){
          //transfer data -&gt; FormB
      }
      ...
  </code></pre>
  
  <p>In <strong>formB.tsx</strong> I have a different rendered view, but I want the state of FormA to be displayed here:</p>
  
  <pre><code>class FormB extends React.Component&lt;any, any&gt;{
      ...
      render(){
          return(
          &lt;p&gt; //the FormA state here &lt;/p&gt;
          )
      }
  </code></pre>
  
  <p>All the information I see online are for parent-child components where this information is passed through props, but here the components are technically both parents as they do not interact with each other. How can I make this data transfer? Through an intermediate component (is this efficient)?</p>
  
  <p>EDIT: I fixed this problem by using a Javascript eventBus.</p>