First published in the Sparrow docs @blueju
Recently, I am writing a micro front end and background management platform based on Umi and Qiankun. Because it is based on the realization of real needs, there is such a function to be implemented.
- After login, the menu is not displayed
- The child application menu is displayed only after the child application is entered
You need to switch between the display and hide state of the menu, and Ant Design Pro is implemented using Pro Layout, so you can find such an API after looking for documents
MenuRender customizes the menu’s render method
From the documentation, if we want to display a custom menu, just return a React Node via this API. If we don’t want to display the menu, we can just return false through this API;
So what if we just want to switch from “no menu” to “show the original default menu”?
Through CTRL + left mouse button traceability, all kinds of data, all kinds of attempts and other operations found, return a undefined