This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-14
Channels
- # announcements (10)
- # architecture (4)
- # atom-editor (1)
- # babashka (53)
- # babashka-sci-dev (118)
- # beginners (91)
- # biff (12)
- # calva (19)
- # clara (13)
- # clerk (20)
- # clj-commons (25)
- # clj-kondo (6)
- # cljdoc (19)
- # cljs-dev (3)
- # clojars (2)
- # clojure (71)
- # clojure-art (2)
- # clojure-europe (68)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (3)
- # clojured (19)
- # clojurescript (34)
- # clr (19)
- # cursive (11)
- # emacs (14)
- # fulcro (3)
- # helix (2)
- # holy-lambda (2)
- # honeysql (27)
- # hyperfiddle (39)
- # malli (2)
- # off-topic (83)
- # polylith (4)
- # rdf (22)
- # re-frame (20)
- # reitit (4)
- # rewrite-clj (14)
- # shadow-cljs (17)
- # slack-help (2)
- # tools-deps (45)
- # xtdb (3)
hey all! I’m trying to extend https://firebase.google.com/docs/reference/js/firestore_.timestamp with p/Datafiable
but I’m not quite sure how to “point at” the type in my extend-type
call, the below isn’t working. Anyone know what I’m missing?
(extend-type firestore/Timestamp
protocols/Datafiable
(datafy [this]
{:some :data}))
(d/datafy some-timestamp)
Doesn’t return the mapan instance of firestore/Timestamp
It’s false
the timestamp logs as
#object[Timestamp [object Object]]
I wonder if this has anything to do with the slightly weird(?) constructor definition here? https://firebase.google.com/docs/reference/js/firestore_.timestamp.md#constructors
#object[Timestamp]
I don’t know if browser console is super helpful here because the node and browser APIs vary a bit.
which makes me notice that the earlier link was to the wrong docs: https://firebase.google.com/docs/reference/node/firebase.firestore.Timestamp
just want to find out if the timestamp is in there and what you actually have is some wrapped thing
just noticed that as well
let me re-read datafy docs
try the extend-type anyways. JS types are funky sometimes. these also seem to be generated from protobuf which makes wrapping likely
Ok, it was all working as expected, I extended the type in the wrong env (browser vs. node)
I have a Phoenix Liveview + Clojurescript app. How can I run a function in clojurescript every time a page is loaded? I want to run the function when a user moves from page A
to B
to C
Maybe I would listen to DOMContentLoaded
on each page.