title: How to consume BehaviorSubject in React app
body: <p>My main application(not react) has BehaviorSubject data object. User clicks a button and he can open React side of the application in a child browser window.</p>
  
  <p>The react side of the app has a component that takes data and creates tables with the data. </p>
  
  <p>While being in the child window I can go to my debugger and do the following to see the subject values change in console.</p>
  
  <pre><code>window.opener.app.varCollection$.subscribe({
    next: (v) =&gt; console.log(JSON.stringify(v))
  });
  </code></pre>
  
  <p>How do i feed this data to a react component below? I am not sure how the subscription would work in React side.</p>
  
  <pre><code>&lt;DataPanel jsonData={this.state.sysvarData} &gt;&lt;/DataPanel&gt;
  </code></pre>