@settinghead:
> is there a way to automatically figure out which states it depends on and auto start all of them
no, mount would just start that particular state: i.e. (mount/start #'foo/bar)
would only start #'foo/bar
.
mount does not keep a real dependency graph. it has certain things up its sleeve: https://github.com/tolitius/mount/issues/12#issuecomment-167150505 but it mostly relies on compiler to figure out dependencies.
what would be a use case you would need to start a state with all its previous states?
@tolitius: i’m actually trying to migrate a component-based system to a mount-based system. the approach i’m experimenting is write a new part of my app as mount states, with a component lifecycle wrapper around it (i.e. in my component’s start
and stop
functions would invoke (mount/start #'some-ns/some-state)
and (mount/stop #'some-ns/some-state)
that’s why i was looking for dependency graph for #'some-ns/some-state
, so that i can start everything it depends on first
the approach does look overly complicated. i’m currently running into runtime errors