This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-11
Channels
- # announcements (1)
- # aws (5)
- # beginners (35)
- # calva (18)
- # clerk (5)
- # clojure (20)
- # clojure-berlin (1)
- # clojure-dev (12)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (159)
- # clojure-uk (5)
- # clojurescript (8)
- # conjure (1)
- # cursive (18)
- # events (10)
- # fulcro (23)
- # hyperfiddle (5)
- # introduce-yourself (3)
- # juxt (2)
- # off-topic (1)
- # polylith (4)
- # portal (11)
- # releases (1)
- # shadow-cljs (4)
- # xtdb (9)
- # yamlscript (1)
I have a missionary stream (not signal) coming from an http request, and i want to see those values in the dom/collect them my own logic. right now I have
(e/defn Response [v]
(let [r (e/server (new (llm/ask-ant-stream v)))]
(e/client
(dom/h4 (dom/text r)))))
and its only rendering the very last value in the stream. When I do this, it prints the values in as they come in
(m/? (m/reduce conj (m/ap
(println (m/?> (ask-ant-stream "hello"))))))
any ideas? am i misunderstanding and missionary streams are treated as signals in electric? what is the best way to do what I am trying to do (show every value of stream onto dom) maybe something like
(e/client (m/? (m/ap (reset! !val (m/?> (e/server (llm/ask-ant-stream "hello")))))))
you can use m/reductions to produce a discrete succession of accumulated values, which electric will consume as a continuous flow