This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-18
Channels
- # 100-days-of-code (2)
- # beginners (10)
- # boot (1)
- # calva (8)
- # cider (13)
- # cljdoc (7)
- # clojure (32)
- # clojure-uk (15)
- # clojurescript (9)
- # code-reviews (1)
- # cursive (8)
- # datomic (1)
- # emacs (1)
- # fulcro (9)
- # hoplon (4)
- # nrepl (1)
- # off-topic (30)
- # onyx (2)
- # re-frame (11)
- # reitit (3)
- # shadow-cljs (33)
- # tools-deps (3)
- # vim (5)
I read this issue and wonder
https://github.com/Day8/re-frame/issues/299
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
hi guys
{: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
@llsouder @brownmoose3q when you use a tool like re-frame-10x
or re-frisk
, these sorts of problems tend to be easier to diagnose.
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 https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md and I can't understand why this approach is considered bad. Could someone please explain more on this?