Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 245 Bytes
(ns components-example.subscriptions
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:page
(fn [db _]
(:page db)))
(reg-sub
:document
(fn [db [_ path]]
(let [doc (:document db)]
(if path (get-in doc path) doc))))