title: How to close react-burger-menu when link click in a component?
body: <p>i am working with <a href="https://github.com/negomi/react-burger-menu" rel="nofollow noreferrer">negomi/react-burger-menu</a>. i want to close my sidebar menu when a link is click not outside or cross button click just link click then my sidebar menu automatically close itself. But problem is my link is under another component , Suppose my component <code>&lt;ShipForMe/&gt;</code> and my link is under <code>&lt;ShipForMe/&gt;</code> like <code>&lt;NavLink to=&quot;/dashboard/ship-for-me/my-request/pending&quot;&gt;My Request&lt;/NavLink&gt;</code></p>
  <p>Sidebar.js</p>
  <pre><code>&lt;div className=&quot;sidebar-wrap &quot; id=&quot;outer-container&quot;&gt;
                  &lt;div className=&quot;dashboard-menu rounded&quot;&gt;
                      &lt;ShipForMe/&gt;
                      &lt;MyWallet/&gt;
                      &lt;Profiles/&gt;
                      &lt;div className=&quot;sidebar-item ds-item&quot;&gt;
                          &lt;div className=&quot;sidebar-item__title&quot;&gt;
                              &lt;NavLink to=&quot;&quot;&gt;VIP Center&lt;/NavLink&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div className=&quot;dashboard-responsive rounded&quot;&gt;
                      &lt;Menu pageWrapId={ &quot;page-wrap&quot; } outerContainerId={ &quot;outer-container&quot; } isOpen={false}&gt;
                              &lt;div id=&quot;page-wrap&quot; style={{marginTop: '-25%'}}&gt;
                                  &lt;ShipForMe handleUrl={handleUrl}/&gt;
                                  &lt;MyWallet/&gt;
                                  &lt;Profiles/&gt;
                                  &lt;div className=&quot;sidebar-item ds-item&quot;&gt;
                                      &lt;div className=&quot;sidebar-item__title&quot;&gt;
                                          &lt;NavLink to=&quot;&quot;&gt;VIP Center&lt;/NavLink&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                      &lt;/Menu&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  <p>ShipForMe.js</p>
  <pre><code>&lt;div className=&quot;ship-wrap ds-item&quot;&gt;
           &lt;div className=&quot;sidebar-item&quot;&gt;
              &lt;div className=&quot;sidebar-item__title&quot;&gt;
                 Ship for me
              &lt;/div&gt;
              &lt;ul className=&quot;sidebar-item__lists&quot;&gt;
                 &lt;li&gt;
                    &lt;NavLink to=&quot;/dashboard/ship-for-me/my-request/pending&quot;&gt;My Request&lt;/NavLink&gt;
                 &lt;/li&gt;
                 &lt;li&gt;
                    &lt;NavLink to=&quot;/dashboard/ship-for-me/forwarding-parcel/abroad-to-bd&quot;&gt;My Forwarding Parcel&lt;/NavLink&gt;
                 &lt;/li&gt;
              &lt;/ul&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  </code></pre>
  <p>Note: <code>isOpen{flase}</code> is not working, it is only working when link is physical there.</p>