Refactor getMenuItems to be component based
TarikHuber opened this issue · 4 comments
TarikHuber commented
Refactor the getMenuItems
to be component based and not just a function.
- It should be lazyloaded as component.
- Base stuff could be done with prepared rmw components
- Nested menu items should be just childs of the component
- On desktop build in open on hover minified menu
jswelsh commented
@TarikHuber want help with this?
TarikHuber commented
Let me just start to setup the guide lines and you can continue on them. Thx :)
TarikHuber commented
Hi @jswelsh I have made the changes. We can leave the menuItems
as they are. It requires just adding a MenuContent
component to every project to make it work. With that we can control what props the menuItems should get. I also refactored the menu to memoize what menu item is selected or if it is in a nested menu after a reload.
This change should improve the first load performance because all the code in the menuItems is now not needed in the config.
jswelsh commented
awesome, Ill check out the changes in a bit. 🎉