Liking cljdoc? Tell your friends :D
ClojureScript only.

hiposfer.rata.core

A reagent reactive wrapper around Datascript's transactor

Although this is a rewrite of mpdairy/posh library it is much more useful and simple. The problem with posh is that it tries to do too much. It target both datomic and datascript. Therefore it recreates the reagent/atom implementation internally.

This bring other problems with it:

  • all queries must be cached (but reagent is capable of doing that with reagent/track)

  • whenever the state changes, posh must figure out which query result should be updated (but reagent is capable of doing that by diffing the result of the queries)

  • only the currently viewable components's queries should be executed (but reagent already does that since all inactive reagent/track are removed automatically)

  • all the problems above also make posh a big library with hundreds of lines (reagent.tx has barely 50 even with all datascript functionality !!)

    See https://reagent-project.github.io/news/news060-alpha.html for more information

A reagent reactive wrapper around Datascript's transactor

Although this is a rewrite of mpdairy/posh library it is much
more useful and simple. The problem with posh is that it tries
to do too much. It target both datomic and datascript. Therefore
it recreates the reagent/atom implementation internally.

This bring other problems with it:
- all queries must be cached (but reagent is capable of doing that
   with reagent/track)
- whenever the state changes, posh must figure out which query result
  should be updated (but reagent is capable of doing that by diffing
   the result of the queries)
- only the currently viewable components's queries should be executed
   (but reagent already does that since all inactive reagent/track are
   removed automatically)
- all the problems above also make posh a big library with hundreds of lines
  (reagent.tx has barely 50 even with all datascript functionality !!)

  See https://reagent-project.github.io/news/news060-alpha.html
  for more information
raw docstring

dbcljs

(db)

return the Datascript Database instance.

The returned version is immutable, therefore you cannot use datascript/transact!.

This is meant to keep querying separate from mutations

return the Datascript Database instance.

The returned version is immutable, therefore you cannot use
datascript/transact!.

This is meant to keep querying separate from mutations
sourceraw docstring

init!cljs

(init! conn)

takes a Datascript conn and starts listening to its transactor for changes

takes a Datascript conn and starts listening to its transactor for changes
sourceraw docstring

pull!cljs

(pull! selector eid)

same as datascript/pull but returns a ratom which will be updated every time that the value of conn changes

same as datascript/pull but returns a ratom which will be updated
every time that the value of conn changes
sourceraw docstring

q!cljs

(q! query & inputs)

Returns a reagent/atom with the result of the query. The value of the ratom will be automatically updated whenever a change is detected

Returns a reagent/atom with the result of the query.
The value of the ratom will be automatically updated whenever
a change is detected
sourceraw docstring

transact!cljs

(transact! tx-data)
(transact! tx-data tx-meta)

same as Datascript transact except that uses the connection passed at init!

same as Datascript transact except that uses the connection
passed at init!
sourceraw docstring

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

× close