Fork me on GitHub

I read this issue and wonder What benefits purity of view func can give? Talking about testing, if data is what we care, then test flow would be: - (dispatch <evt>) - (expect (subscribe <sub>) <be_such_data>) So no benefits for testing, if I'm not mistaken cc @mikethompson @razum2um


{:db (do something with it) :dispatch [your second event]} to dispatch two how can i dispatch multiple ?


can i do wrap :dispatch val as do block or what the right thing to do it ?


@valtteri that's great thanks


Hi all. I have a button. On-click calling a function A works. On click calling dispatch which triggers the same function A causes my page to go blank. I see A's print to the console but then I get a blank page.


Hey, @llsouder Probably you're setting your app-db to a nil by this dispatch If you used reg-event-db - make sure your event handler returns next app-db's state

👍 4

@llsouder @brownmoose3q when you use a tool like re-frame-10x or re-frisk, these sorts of problems tend to be easier to diagnose.

✔️ 4

YES you were correct. I changed my function to return the db and now it works. I am using re-frame-10x and I noticed the 'nil' but I didn't understand it until @brownmoose3q pointed out the need to return the db.


I'm reading this document and I can't understand why this approach is considered bad. Could someone please explain more on this?