News for hackers. Stuff that matters.
Re:Luminus – A Clojure Web Framework by capableweb on Monday April 13, 2020 @06:03AM (#22854454)
Hm, really? Maybe you're missing a layer of indirection if that's so?

Usually I end up wrapping things myself so I have one "setup-handler :name" function/macro that creates the subscription and event db handler for me. There are also existing libraries that does this for you, if writing it yourself is not wanted.

One example of such library: https://gitlab.com/nikperic/reframe-utils

`reg-basic-sub` has this outcome:

  (reg-basic-sub :common/active-page)

  ;; Equivalent to
  (reg-basic-sub :common/active-page :common/active-page)

  ;; Equivalent to
  (reg-sub
    :common/active-page
    (fn [db _]
      (:common/active-page db)))

There are no comments on this comment yet.