Fork me on GitHub
#re-frame
<
2018-05-12
>
aleksandr15:05:46

The first one I suppose will be more efficient because in the second one a subscribe handler will be rerun after an each app-db update

MegaMatt15:05:28

if i want an fx handler to dispatch two actions can i do that? :dispatch [[::close-modal] [::remove-loader]] <- that doesn't work for me

aleksandr15:05:53

You should use :dispatch-n (list [::close-modal] [::remove-loader])

MegaMatt15:05:18

great thanks.

aleksandr15:05:49

Glad to help you

MegaMatt15:05:30

if i have a form of data i need to save to my database, is it better to have the form clean and attach certain data (like created-at is-template? etc) or have my event fx clean the data and add missing bits before sending it to db?

eoliphant15:05:36

@al.vyguzov I don’t think it’s going to make an appreciable difference. I try to use what makes the most sense in terms of comprehensibility, etc first. I use the indexed entity approrach pretty heavily so stuff is usually never more than 2 or 3 ‘deep’