Coordinators: solving a problem you didn’t even know you had
Gabor Varadi

Brilliant! This solved a problem I have had for a few weeks, thanks for the post! As usual square solve it in a simple and elegant way.

The only issue is you may need a big switch statement in your CoordinatorProvider to figure out which view goes with which coordinator, which didn’t sound so good.

After some experimentation I’ve gone with using the @IntoMap of Dagger to provide the Coordinators, with the may key to be an id (in my case the layout res id, since I’m using defrag library, but it can easily be a normal id res), this way I don’t have to have a factory that knows about all my coordinators.

Great post — thanks a lot!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.