mount

pablore 2018-11-12T18:54:39.051Z

Hi! Does mount’s start-with only start the supplied states or does it start the other states too but without the replace value?

pablore 2018-11-12T18:58:18.053300Z

Or more specific to my problem: I have a configuration state Config and a Database state which depends on Config. For testing I want to start-with my Config with testing values. Will the Database state change when I start the Config with the custom value?

tolitius 2018-11-12T19:11:52.055700Z

@pablore start-with will start everything swapping states in a start-with map: i.e.

(mount/start-with {#'app.env/config {:db {:uri "test-uri"}}})
will start all the components with {:db {:uri "test-uri"}} instead of the "original" config state

tolitius 2018-11-12T19:13:01.056500Z

I would recommend using swap instead though which will do the same thing, it just can be later composed with other filters

tolitius 2018-11-12T19:13:10.056700Z

https://github.com/tolitius/mount#composers-toolbox