Just as an operating system provides resources like the filesystem to address needs that are not specific to any particular application, The Sweet Tooth Frontend framework aims to address many common needs that single page apps have in common.
The library is a layer on top of re-frame, providing handlers, subscriptions, components, utilities and conventions to give you a sane, extensible starting point to deal with:
Transform various calls into a dispatch on ::sync
or
::sync-once
. Those dispatches take a req
.
sync signature
sync-fx handler signature
(defn sync-fx
"Returns an effect handler that dispatches a sync event"
[[method endpoint opts]]
(fn [_cofx [call-opts params]]
{:dispatch [::sync [method endpoint (build-opts opts call-opts params)]]}))
(fn [_cofx [call-opts params]]
{:dispatch [::sync [method endpoint (build-opts opts call-opts params)]]})
Sweet Tooth eliminates much of the boilerplate for creating forms.
Watch with
lein doo
Run once with
lein doo node test once
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close