This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-01
Channels
- # aleph (4)
- # arachne (24)
- # beginners (231)
- # boot (4)
- # cider (63)
- # clara (36)
- # cljs-dev (57)
- # clojure (195)
- # clojure-dev (12)
- # clojure-gamedev (2)
- # clojure-greece (1)
- # clojure-italy (10)
- # clojure-poland (4)
- # clojure-spec (36)
- # clojure-uk (65)
- # clojurescript (133)
- # core-async (8)
- # core-logic (2)
- # cursive (18)
- # data-science (3)
- # datomic (58)
- # defnpodcast (3)
- # duct (2)
- # emacs (2)
- # fulcro (27)
- # graphql (3)
- # hoplon (18)
- # jobs (2)
- # jobs-discuss (10)
- # jobs-rus (1)
- # lumo (1)
- # mount (6)
- # nyc (2)
- # off-topic (27)
- # pedestal (13)
- # re-frame (71)
- # reagent (105)
- # reitit (4)
- # ring (2)
- # ring-swagger (1)
- # rum (10)
- # shadow-cljs (172)
- # spacemacs (24)
- # sql (26)
- # tools-deps (1)
- # uncomplicate (4)
- # unrepl (51)
- # vim (3)
- # yada (11)
Hi @luke, in FactUI, if I use rum/defc
to create rum components, then (fr/transact! app-state [...])
works good. But, if I use rum/defcs
then, I get this error while transacting (Error: No protocol method ISwap.-swap! defined for type cljs.core/PersistentArrayMap: {:rum/args (#object [cljs.core.Atom {:val #factui.impl.session.DatomSession{:delegate #object[clara.rules.engine.LocalSession], :store #factui.impl.store.SimpleStore{:schema {:segment/id {:db/cardinality :db.cardinality/one, :db/valueType :db.type/string}, :localState/name {:db/cardinality :db.cardinality/one, :db/valueType :db.type/string}, :db/index {:db/cardinality :db.cardinality/one, :db/valueType :db.type/boolean}, :book/authors {:db/cardinality :db.cardinality/many, :db/valueType :db.type/ref}, :db/unique {:db/cardinality :db.cardinality/one, :db/valueType :db.type/keyword}, :user/membershipId {:db/cardinality :db.cardinality/one, :db/valueType :db.type/string}, :book/isbn {:db/cardinality :db.cardinality/one, :db/valueType :db.type/string}, :relation/src-entity {:db/cardinality :db.cardinality/one, :db/valueType :db.type/ref}, :currentState/state {:db/cardinality :db.cardinality/one, :db/value…)
I am using rum/defcs
because I wanted to use my own mixins.
FactUI’s state is different from Rum’s state. It might be the case that FactUI is not (currently) compatible with defcs. Reason being, both of those impose special meaning on the first argument to render
I’d have to dive in to the internals of both to figure out if there’s a way to reconcile them
Is there a way to get data from a network cal and use it as mixin so that the component can subscribe to that mixin?
it should be possible in theory to have a component with both rum state and factui state