Liking cljdoc? Tell your friends :D

hive.events

Unified event system for Clojure/ClojureScript.

Combines:

  • re-frame interceptor chain (portable to JVM)
  • re-frame effects/coeffects system
  • domino-style declarative models with async support

Design principles:

  • Events as data
  • Pure handlers returning effect maps
  • Interceptors for cross-cutting concerns
  • Async-first with core.async

Usage: (require '[hive.events :as ev])

;; Register effect handlers (ev/reg-fx :http (fn [request] ...)) (ev/reg-fx :db (fn [tx] ...))

;; Register event handlers (ev/reg-event-fx :user/login [ev/debug ev/validate] ; interceptors (fn [{:keys [db]} [_ credentials]] {:db (assoc db :loading? true) :http {:method :post :url "/login" :body credentials}}))

;; Dispatch events (ev/dispatch [:user/login {:email "..." :password "..."}])

Unified event system for Clojure/ClojureScript.

Combines:
- re-frame interceptor chain (portable to JVM)
- re-frame effects/coeffects system
- domino-style declarative models with async support

Design principles:
- Events as data
- Pure handlers returning effect maps
- Interceptors for cross-cutting concerns
- Async-first with core.async

Usage:
  (require '[hive.events :as ev])

  ;; Register effect handlers
  (ev/reg-fx :http (fn [request] ...))
  (ev/reg-fx :db (fn [tx] ...))

  ;; Register event handlers
  (ev/reg-event-fx :user/login
    [ev/debug ev/validate]  ; interceptors
    (fn [{:keys [db]} [_ credentials]]
      {:db (assoc db :loading? true)
       :http {:method :post :url "/login" :body credentials}}))

  ;; Dispatch events
  (ev/dispatch [:user/login {:email "..." :password "..."}])
raw docstring

->interceptorclj/s

(->interceptor & args)
source

->timed-interceptorclj

(->timed-interceptor & args)
source

append-interceptor!clj/s

(append-interceptor! & args)
source

clear-fxclj/s

(clear-fx & args)
source

clear-fx-executor!clj/s

(clear-fx-executor! & args)
source

debugclj/s

source

default-invoke-fx-handlerclj/s

(default-invoke-fx-handler & args)
source

dispatchclj/s

(dispatch & args)
source

dispatch-multiclj/s

(dispatch-multi & args)
source

dispatch-syncclj/s

(dispatch-sync & args)
source

do-fxclj/s

(do-fx & args)
source

enqueueclj/s

(enqueue & args)
source

event-registered?clj/s

(event-registered? & args)
source

executeclj/s

(execute & args)
source

fsm-compileclj/s

(fsm-compile & args)
source

fsm-make-sub-handlerclj/s

(fsm-make-sub-handler & args)
source

fsm-runclj/s

(fsm-run & args)
source

fsm-run-asyncclj

(fsm-run-async & args)
source

fsm-run-subclj/s

(fsm-run-sub & args)
source

fsm-run-sub-fxclj/s

(fsm-run-sub-fx & args)
source

fsm-stepclj/s

(fsm-step & args)
source

fsm-sub-error?clj/s

(fsm-sub-error? & args)
source

fx-executor-installed?clj/s

(fx-executor-installed? & args)
source

get-eventclj/s

(get-event & args)
source

get-fxclj/s

(get-fx & args)
source

get-interceptorsclj/s

(get-interceptors & args)
source

handler-registered?clj/s

(handler-registered? & args)
source

inject-cofxclj/s

(inject-cofx & args)
source

reg-cofxclj/s

(reg-cofx & args)
source

reg-event-dbclj/s

(reg-event-db & args)
source

reg-event-fxclj/s

(reg-event-fx & args)
source

reg-fxclj/s

(reg-fx & args)
source

register-handler!clj/s

(register-handler! & args)
source

registered-cofx-idsclj/s

(registered-cofx-ids & args)
source

registered-event-idsclj/s

(registered-event-ids & args)
source

registered-fx-idsclj/s

(registered-fx-ids & args)
source

registry-snapshotclj/s

(registry-snapshot & args)
source

remove-handler!clj/s

(remove-handler! & args)
source

restore-registry!clj/s

(restore-registry! & args)
source

set-fx-executor!clj/s

(set-fx-executor! & args)
source

set-log-fn!clj/s

(set-log-fn! & args)
source

stale-registrationsclj/s

(stale-registrations & args)
source

trim-vclj/s

source

unreg-cofxclj/s

(unreg-cofx & args)
source

unreg-eventclj/s

(unreg-event & args)
source

unreg-fxclj/s

(unreg-fx & args)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close