I would like to crate a 'login component' that display some kind of popup modal. Consider I've many places all over my app that can call this modal,What is a batter approach: 1. To place the 'login component' everywhere I use it although its the same everywhere. 2. Place it in top level component and show and hide it with some kind of event listener.
In the first way I encapsulate the component to display what it needs and have an easy control of its life cycle. In the second way I avoid repeating my self and call it every components.
Thanks.