Skip to content

Singleton presenters

Ahmad K. Bawaneh edited this page Nov 7, 2021 · 1 revision

In some cases we might need to cache the presenter/view instances, because we don't want to re-render the view every time the presenter got activated or there is a state in our presenter that we need to preserve, in such cases we can mark the presenter as a singleton presenter using @Singleton(true), for a singleton presenter the same instance of the presenter and the view will be used and won't create a new instance with every activation.