Fork me on GitHub
#om
<
2015-06-18
>
edbond12:06:45

how to call om/update! in callback?

hmadelaine13:06:17

@edbond: could you be more specific ? What is the context ?

edbond13:06:32

never mind, I'm doing it with plan JS now. simple_smile

edbond16:06:14

done in plain old coffeescript, in less than 100 lines. Without cursors, invalid derefs etc

edbond16:06:38

messages editor: key => [messages]. Add, click to edit (Save/Cancel), Remove. Store on server. Reject blank messages.

edbond16:06:57

incomplete cljs version was around 200 lines. React, om, core.async, om-tools

hmadelaine16:06:53

@edbonf any chance to see it on github, both versions ?

edbond16:06:52

the main problem for me is communication between components.

edbond16:06:30

initially I was doing this by passing cursors, then switched to callback functions, then core.async.

edbond16:06:47

I think the best is a bus (chan) with pub/sub

hmadelaine16:06:58

@edbond, yes pub/sub is the best option

hmadelaine16:06:44

@edbond it keeps the logic centralized

edbond16:06:55

yep, I should try again.

edbond16:06:21

Also it's not fair comparison because cljs version includes all templates, coffeescript uses existing html page.