Thanks for sharing this, really appreciated! One tip if I may, while refactoring, instead of moving the original component, it would be cleaner (and smoother) to extract its content into another component and move that one into another file. That is to say leave "MenuList" where it is, extract the content into a "MenuListOld" component that you will move into another file, then return it from the "MenuList" straightaway. This will basically leave the same behaviour as before and create the space for the branching logic without having to change the consumer side. Hope that makes sense :)
Thanks for sharing
My pleasure
Thanks for sharing this, really appreciated! One tip if I may, while refactoring, instead of moving the original component, it would be cleaner (and smoother) to extract its content into another component and move that one into another file. That is to say leave "MenuList" where it is, extract the content into a "MenuListOld" component that you will move into another file, then return it from the "MenuList" straightaway. This will basically leave the same behaviour as before and create the space for the branching logic without having to change the consumer side. Hope that makes sense :)
Hi Marco, thanks for sharing that here, and I think it's better!
Excellent! What extension are you using to show function usage?
Thanks mate, I'm using WebStorm as my main IDE.
This is really helpful. Thanks!
Thanks for letting me know Taro, glad it helps