Fork me on GitHub
#re-frame
<
2017-09-17
>
ricardo08:09:51

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?

danielcompton09:09:13

@ricardo, yep that is for demonstration

sandbags11:09:53

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

sandbags11:09:08

does anyone else see this?

l1sp3r19:09:45

Hi, trying to use re-frame and had a design question

l1sp3r19:09:00

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

l1sp3r19:09:39

is this bad practice? Is there a better way of achieving the goal?

sandbags20:09:24

@l1sp3r the only thing I can suggest to you is perhaps look at re-frame-datatable

mikethompson22:09:33

@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.