This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-17
Channels
- # beginners (51)
- # boot (31)
- # cider (14)
- # clara (13)
- # cljs-dev (15)
- # cljsjs (2)
- # cljsrn (53)
- # clojure (18)
- # clojure-dusseldorf (1)
- # clojure-russia (4)
- # clojure-uk (9)
- # clojurescript (53)
- # cursive (3)
- # datomic (5)
- # docs (1)
- # figwheel (2)
- # fulcro (42)
- # hoplon (3)
- # lein-figwheel (3)
- # leiningen (53)
- # off-topic (1)
- # om (4)
- # re-frame (11)
- # shadow-cljs (8)
I might be missing something. The documentation for “Effectful Handlers” at https://github.com/Day8/re-frame/blob/master/docs/EffectfulHandlers.md has an example of a pure, descriptive alternative to making http calls. It returns an :http
element on the map.
I can’t however find that among the list of built-in effect handlers on the API docs (https://github.com/Day8/re-frame/blob/cf78ad43614b3cd250f8a935a9252f25551a048f/docs/API.md), nor on the code
Is that just an example, and is one expected to write the handler?
@ricardo, yep that is for demonstration
Hrmm... if I generate a new re-frame template app and update compojure, ring, and config to the latest versions (compojure '1.5.0' -> '1.6.0', ring '1.4.0' -> '1.6.2', config '0.8' -> '0.9') when I try and load the home page I get an error
I'm building a component which may be re-used, the subscription must be parameterized in some way, otherwise all uses if the component would share the same data
@l1sp3r you'd normally pass in an id
to the component when it is first instantiated. That id
can be opaque OR it might be a full, literal path within app-db
, up to you, but it should identify the data associated with this instance. The component will then "pass" this id
to all subscriptions and dispatches it uses which, in turn, gives the handlers knowledge of what data they should use/update.