You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some menu components that depend on the state in the rest of the page.
For example, the contents of editMenu will change based on the user interactions in another component in the page. However most of the times, the editMenu is hidden until the user clicks on the MenuButton. How can I avoid the unnecessary editMenu re-renders while it is not visible? It only needs to be rendered when the user clicks on MenuButton.
Hi @seperman , this is a great question. In fact, we can avoid re-rendering menu items by unmounting them, which can be achieved by the unmountOnClose prop of Menu component.
Hello,
Thanks for the great menu library.
I have some menu components that depend on the state in the rest of the page.
For example, the contents of
editMenu
will change based on the user interactions in another component in the page. However most of the times, theeditMenu
is hidden until the user clicks on theMenuButton
. How can I avoid the unnecessaryeditMenu
re-renders while it is not visible? It only needs to be rendered when the user clicks onMenuButton
.The text was updated successfully, but these errors were encountered: