This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-06
Channels
- # announcements (58)
- # babashka (43)
- # babashka-sci-dev (22)
- # beginners (8)
- # biff (8)
- # calva (62)
- # circleci (3)
- # clerk (6)
- # clj-kondo (27)
- # cljsrn (9)
- # clojure (61)
- # clojure-austin (4)
- # clojure-conj (3)
- # clojure-europe (11)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-norway (4)
- # clojure-spain (5)
- # clojure-uk (2)
- # clojurescript (51)
- # data-science (1)
- # datascript (4)
- # emacs (33)
- # events (14)
- # funcool (14)
- # gratitude (13)
- # introduce-yourself (1)
- # jobs (9)
- # lsp (58)
- # malli (23)
- # missionary (31)
- # nextjournal (9)
- # off-topic (35)
- # proletarian (2)
- # re-frame (5)
- # remote-jobs (7)
- # shadow-cljs (2)
- # spacemacs (7)
- # sql (26)
- # testing (12)
- # vim (1)
- # web-security (3)
- # xtdb (2)
Hi all, I'm stuck with this problem .. and need some help please I'm using realm from Js side to fetch some tasks objects , from console log everything seems fine. but this is how my db looks like from re-frisk ..
tasks {1 keys} ⎘
":2"[TaggedValue: ForeignType, ]
@U01D1CZKK6K i'm not sure i understand the issue well.
yeah @U051091NM that's unfamiliar to me I guess if i know what i means i will be able to fix it
Hi @U01D1CZKK6K. Re-frisk is showing that a native JS type is in the database, not a cljs type. Try js->clj in your code to convert the type.
➕ 2
Hi @UGNMGFJG3.. I already had that 😕 but it didn't fix it for me ... this is how my code looks like
(reg-cofx
:tasks-storage
(fn [cofx _]
(let [tasks (js->clj (get-all-
tasks))]
(assoc cofx :tasks-storage tasks))))
(rf/reg-event-fx
:initialize-db
[(rf/inject-cofx :tasks-storage)]
(fn [{:keys [db tasks-storage]}]
{:db (or (when-not (empty? tasks-storage) (assoc initial-state :tasks tasks- storage))
initial-state)}))