Zhuinden / flowless

[DEPRECATED] Based on Flow 1.0-alpha. To keep your life simple, use zhuinden/simple-stack instead.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make resource sharing examples with ServiceProvider

Zhuinden opened this issue · comments

Currently there is an example in the README for when the resources of the context chain are retained.

in case of traversal A-B-C => A-B-D :

the matched states A and B have their resources retained

the missing state C has its resources destroyed

the new state D has its resource created

However, you might want to only retain the new state's resources, and you might want to share resources between states.

Such examples would be great to have. Also, think about key nesting.

ServiceProvider can be integral part of resource sharing to a given key, via context instead of context.getSystemService() in general.

Therefore #4 is also relevant.

And gotta do #21 first (done)