Liking cljdoc? Tell your friends :D

domino.core


eventcljmacro

(event [_ in out :as args] & body)
source

initial-transactionclj/s

(initial-transaction {:domino.core/keys [model] :as ctx} initial-db)

If initial-db is not empty, transact with initial db as changes

If initial-db is not empty, transact with initial db as changes
sourceraw docstring

initializeclj/s

(initialize schema)
(initialize {:keys [model effects events] :as schema} initial-db)

Takes a schema of :model, :events, and :effects

  1. Parse the model
  2. Inject paths into events
  3. Generate the events graph
  4. Reset the local ctx and return value

ctx is a map of: ::model => a map of model keys to paths ::events => a vector of events with pure functions that transform the state ::effects => a vector of effects with functions that produce external effects ::state => the state of actual working data

Takes a schema of :model, :events, and :effects

1. Parse the model
2. Inject paths into events
3. Generate the events graph
4. Reset the local ctx and return value

ctx is a map of:
  ::model => a map of model keys to paths
  ::events => a vector of events with pure functions that transform the state
  ::effects => a vector of effects with functions that produce external effects
  ::state => the state of actual working data
  
sourceraw docstring

transactclj/s

(transact ctx changes)

Take the context and the changes which are an ordered collection of changes

Assumes all changes are associative changes (i.e. vectors or hashmaps)

Take the context and the changes which are an ordered collection of changes

Assumes all changes are associative changes (i.e. vectors or hashmaps)
sourceraw docstring

trigger-effectsclj/s

(trigger-effects ctx effect-ids)

Triggers effects by ids as opposed to data changes

Accepts the context, and a collection of effect ids

Triggers effects by ids as opposed to data changes

Accepts the context, and a collection of effect ids
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close