Add better comments

This commit is contained in:
Mike Thompson 2016-07-07 15:16:49 +10:00
parent 0d31e3c7c6
commit 3cb824f072
2 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,8 @@ Headline:
though they involve the same event id, `:some-event`, the query vectors do not test `=`.
- added new subscription registration functions called `re-frame.core/def-sub`. It is an
alternative to `re-frame.core/register-sub` which is significantly easier to use and understand,
alternative to `re-frame.core/register-sub` (now renamed to `re-frame.core/def-sub-raw`).
`def-sub` is significantly easier to use and understand,
while often also being more performant. The design has really fallen out nicely and we're
delighted with it.

View File

@ -1,7 +1,7 @@
(ns todomvc.subs
(:require [re-frame.core :refer [def-sub subscribe]]))
;; register-pure-sub allows us to write subscription handlers without ever
;; Using def-sub, you can write subscription handlers without ever
;; using `reaction` directly.
;; This is how you would register a simple handler.
(def-sub