This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-18
Channels
- # adventofcode (69)
- # babashka (21)
- # beginners (246)
- # calva (49)
- # chlorine-clover (19)
- # circleci (3)
- # clj-kondo (38)
- # cljsrn (1)
- # clojure (52)
- # clojure-australia (2)
- # clojure-europe (41)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-taiwan (2)
- # clojure-uk (28)
- # clojurescript (12)
- # cryogen (6)
- # cursive (6)
- # datahike (3)
- # deps-new (5)
- # fulcro (2)
- # garden (1)
- # graalvm (3)
- # hoplon (48)
- # jackdaw (6)
- # jobs (3)
- # kaocha (6)
- # malli (3)
- # off-topic (51)
- # rdf (1)
- # reagent (40)
- # reitit (32)
- # remote-jobs (1)
- # reveal (24)
- # shadow-cljs (21)
- # startup-in-a-month (5)
- # xtdb (8)
So @ps, I think you have what you need for the solution.
As you can see in my response here https://clojurians.slack.com/archives/C0E1SN0NM/p1610920769030000?thread_ts=1610907711.025500&cid=C0E1SN0NM and @olivergeorge’s example above, the renderItem
argument is a JS Object.
So you can't use (:name video)
or (:url video)
lookup like with a CLJ map.
You can use goog.object
like in theses examples or libraries like:
• cljs-oops https://github.com/binaryage/cljs-oops
• js-interop https://github.com/applied-science/js-interop
So in you case, you end up with a video-comp like that:
(ns your.ns
(:require [goog.object :as gobj])
(defn video-comp [video]
[:> View
[:> Video
{:style {:height 400
:width "100%"}
:controls true
:paused true
:source {:uri (gobj/get video "uri")}}]
[:> Text (gobj/get video "name")]])
🙌 3
✅ 3
🙏 3