This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-19
Channels
- # beginners (240)
- # boot (9)
- # braveandtrue (2)
- # bristol-clojurians (2)
- # cider (2)
- # cljsrn (84)
- # clojars (1)
- # clojure (195)
- # clojure-belgium (9)
- # clojure-china (5)
- # clojure-denmark (4)
- # clojure-italy (7)
- # clojure-mke (1)
- # clojure-norway (1)
- # clojure-russia (16)
- # clojure-spec (74)
- # clojure-uk (15)
- # clojurescript (78)
- # clr (3)
- # code-reviews (4)
- # datascript (8)
- # datomic (71)
- # emacs (9)
- # hoplon (18)
- # jobs (3)
- # kekkonen (32)
- # klipse (19)
- # lambdaisland (2)
- # luminus (15)
- # off-topic (6)
- # om (35)
- # om-next (62)
- # onyx (17)
- # overtone (5)
- # pedestal (1)
- # perun (1)
- # planck (31)
- # protorepl (1)
- # re-frame (135)
- # reagent (34)
- # ring-swagger (6)
- # rum (54)
- # specter (3)
- # untangled (14)
- # yada (14)
Hi folks, what's the recommended way of getting server-driven updates (push notifications, sort of) in a hoplon/castra app? Occasional polling? Or something else?
I've dropped castra in favor of websockets. See https://github.com/rolonicArk/simpleArk/ but ignore the out of date docs. Or look at https://github.com/tiples/welcome/ which has older code but better docs.Simply stated, I use http-kit and com.taoensso/sente.
Previously I extended castra. There are two examples, https://github.com/hoplon/demos/tree/master/castra-notify-chat and https://github.com/hoplon/demos/tree/master/castra-notify-random
@laforge49 the text macro expects a string afaik. It uses interpolation so you can have arbitrary call inside the string. So you can do (h/text "~(my-function arg1 arg2)")
and it will return a text node with the result of calling (my-function arg1 arg2)
Also it's reactive, so if arg1
is a cell, it will update when the value in the cell changes.
So I would recommend you to extract the let to a function and call it inside h/text
the way I showed above.
Yeah, that's my plan @mynomoto. I was just surprised that I could have 2 bindings in a let but not 3.
Also using web sockets for events now
@alandipert WRT > gonna work with jesse on a 'canonical' full-stack example that shows use of all the stuff we advocate
I added a skeleton wiki page to track libs for just such a thing last week: https://github.com/hoplon/hoplon/wiki/Libs-for-Full-Stack-Hoplon-Web-Apps