Is it possible to define two states in the same namespace and have one refer to the other? Right now I'm getting an error that seems like one state isn't started when I try to use it from the other.
@robert.mather.rmm yes, it is possible. can you share an example? also how do you start it: (mount/start)
or (mount/start .. only one state)
?
> in my head using a state would trigger lazy init of the transitive subtree
it would if you are in :cljc
mode and refer to state as @foo
: https://github.com/tolitius/mount#cljc-mode
> trying to organize an init sequence that works the same way as on local
from the mount perspective it will start in the order of: 1. component dependency 2. namespace compilation (i.e. if a
and b
are independent states that live in A
and B
namespaces, they would start in the order that compiler compiles A
and B
)
there seem to be an issue in cljs when a state :start
throws, I thought I got it covered but it still happens
I have something like :start (s/assert* :event-store.db/config (read-config))
when this throws, I see
store.db> @config/map
store.db>
which is not very helpful 😄
if this the state becomes a function call, then I see the exception