title: How To create a Global Component like Toast in React And Refer it in any other component?
body: <p>I am trying to create a App using React. I want to add a toast component globally to the app so that it can be referred by other component for displaying custom messages.</p>
  
  <p>I want to add the toast in the following hierarchy:</p>
  
  <pre><code>ReactDOM.render(
          &lt;BrowserRouter&gt;
              &lt;section&gt;
                    &lt;App /&gt;
                    &lt;Toast /&gt;
              &lt;/section&gt;
          &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>And refer the Toast Component inside the App. How can I implement it?</p>