Fork me on GitHub
#re-frame
<
2022-10-08
>
ahungry00:10:38

Hi all, I found a small 'counter' example that sets up an ::initialize-db, with a map having a key, :counter - I see/understand the pub/sub nature of rf/dispatch, and @(rf/subscribe - and the subscribe seems to handle the rendering of the value post-dispatch event (on-click). How do I get the initial/default value that's stored?

ahungry00:10:48

Aha, https://github.com/Day8/re-frame/blob/master/docs/Loading-Initial-Data.md is the info I was missing - the initial state itself needs to be done/set via a dispatch call (in a component or elsewhere) - cool