This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-30
Channels
- # beginners (126)
- # boot (2)
- # cider (6)
- # cljs-dev (46)
- # cljsjs (8)
- # clojure (122)
- # clojure-greece (57)
- # clojure-italy (6)
- # clojure-poland (3)
- # clojure-russia (2)
- # clojure-serbia (5)
- # clojure-spec (26)
- # clojure-uk (99)
- # clojurescript (39)
- # cursive (15)
- # datascript (7)
- # datomic (21)
- # dirac (7)
- # duct (1)
- # emacs (19)
- # fulcro (58)
- # garden (4)
- # graphql (15)
- # hoplon (2)
- # immutant (1)
- # instaparse (3)
- # jobs (5)
- # juxt (15)
- # klipse (4)
- # leiningen (2)
- # lumo (52)
- # off-topic (8)
- # om (27)
- # onyx (22)
- # other-languages (3)
- # portkey (2)
- # protorepl (2)
- # re-frame (7)
- # reagent (7)
- # ring (11)
- # rum (7)
- # shadow-cljs (114)
- # spacemacs (20)
- # specter (16)
- # test-check (5)
- # timbre (1)
- # unrepl (43)
- # yada (17)
I used before this DynamoDB and MongoDB, what is the best way to use re-frame with Datomic? (“posh?” “datasys?” “datomic-cljs?” ..?)
Eg. use via sente at serverside? What is your experience, which is the best if you have lot of queries?
@sb If you start thinking about DataScript, first measure performance with your typical queries. In my case, it was at least an order of magnitude slower than a simple map, so I decided not to use it. Just my 5c.
When doing component-level testing on a component that loads data via some event, I usually take the approach of:
- Using a fixture that saves, then restores the app db
- Registering the event again, but w/ a mock
- Mounting the component and testing
This works fine, though it emits a warning, e.g.: re-frame: overwriting :event handler for: :foo/bar
I’m curious as to what other approaches people take. For example, another approach I’ve considered is to create a version of the component that takes the event as an argument so the mock can be passed in during the test; the “real” component can then just be a thin wrapper around this version that takes the desired event handler as the default arg. This actually seems like a more “functional” approach.
Hello, I’m very new to re-frame and I’m just curious if the way I’m using it makes sense. My web page makes a request to the backend to retrieve possible commands that can be run which ends up looking like:
{"Name of Section 2" {:commands {"Name of Command1" {:important false :result "pending"}
"Name of Command2" {:important false :result "pending"}}}
"Name of Section 2" {:commands {etc...}}}
Initially I tried to map through the sections and commands and dispatch an http-fx event. The problem I ran into was that I was doing this dispatching in the view, which for some reason caused subscriptions in the view to not receive updated data after the event ran.
The only way I could find to fix this was to move the dispatching of multiple http-fx events out of the view and into events as {:dispatch-n}
Can someone explain to me why I couldn’t simply dispatch multiple events from the view?