mount

ro6 2018-10-24T00:50:12.000100Z

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.

tolitius 2018-10-24T10:36:43.000100Z

@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)?

tolitius 2018-10-24T21:01:19.000100Z

> 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)

richiardiandrea 2018-10-24T22:27:43.000100Z

there seem to be an issue in cljs when a state :start throws, I thought I got it covered but it still happens

richiardiandrea 2018-10-24T22:27:52.000100Z

I have something like :start (s/assert* :event-store.db/config (read-config))

richiardiandrea 2018-10-24T22:28:21.000100Z

when this throws, I see

richiardiandrea 2018-10-24T22:28:57.000100Z

store.db> @config/map
store.db> 

richiardiandrea 2018-10-24T22:29:05.000100Z

which is not very helpful 😄

richiardiandrea 2018-10-24T22:29:23.000100Z

if this the state becomes a function call, then I see the exception