Fork me on GitHub
#cljfx
<
2020-11-30
>
sveri10:11:41

Hi, what is the idiomatic way to initialize the sate of an application at the start of a program?

sveri10:11:32

Should I just do that before calling mount-renderer?

vlaaad10:11:32

Hi! I do exactly that — create application state atom with initial state right before mount-renderer

sveri10:11:02

Awesome, thanks for clarifying that 🙂

vlaaad10:11:54

You can even dispatch some initialization event before mounting (like here — https://github.com/cljfx/cljfx/blob/master/examples/e18_pure_event_handling.clj#L59-L63)

1
sveri10:11:50

@vlaaad Btw, I was looking at cljfx a few years ago (not sure how much) when the project was pretty new and got into it again last week. Really impressing what you have achieved so far, also the documentation is really good.

vlaaad10:11:56

My pleasure! 😊 Try out Reveal as well 😄 https://github.com/vlaaad/reveal

vlaaad10:11:48

I made it with cljfx (in fact, cljfx was made partially because I wanted to make Reveal) and use it all the time as a repl output

sveri11:11:19

Now thats impressive too.