I’m rather new to Ionic, currently building my first big project with the framework.
I was hoping to get some thoughts on the way I’m using modals in terms of performance and memory management.
I’m using modals a lot for reusable components that are accessible from many places in the app such as authentication, search and sharing. I decided to implement them in services so that I won’t have to initialize modals everywhere; these services expose the basic methods to show and hide the modal but abstract the initialization and contain the modals themselves.
My question is, is it ok to have these modals exist in the services or should they be destroyed everytime the user is done with them and re-created when they are needed again. There hasn’t been any performance impact so far, I’m just wondering if anyone had any previous experience with this?