A luxuriously simple and powerful way to make front-ends with DataScript and Reagent in Clojure.
debug-conn
here will work. Haven’t really stress tested it though might just be getting lucky. If you want to be more efficient you could rig up a listen!
on the conn.
build-defc
from rum, but couldn't get that to work either.
pull-all
in posh? I'm trying to write a pull-all version of this: https://github.com/denistakeda/re-posh/blob/master/src/re_posh/subs.cljc#L16p/pull
gives errors. I suspect because it returns a reaction
(which I don't really understand yet).
deref
after each individual pull (add it to your mapping function). This will give the value for the reaction. You may need to wrap the whole thing in a reagent.core/make-reaction
function if re-posh isn't doing that automatically where you are calling the derefs.
okay! So, I'm starting out with dat[ascript|omic] for the first time via re-posh and it's terrifying! I don't know how doing things works :sweat_smile: :
okay, so I have the following value in my app-db:
@re-frame.db/app-db
=> [{:db/id -1, :app/type :type/account, :account/balance 800}]
and I made a subscription like so:
(rp/reg-sub
:account-balance-id
(fn [_ _]
{:type :query
:query '[:find ?id .
:where [?id :app/type :type/account]]}))
:find ?id .
is for. I just copied it from the todomvc
Greetings, hopefully this is the right place to ask this type of question, otherwise i would be happy to move the discussion else where.
Anyone want to try their hand at comparing re-posh (or maybe just posh) to Fulcro? As a starting point, im trying to understand why Fulcro isn't taking advantage of Datascript. The only comment i can find on the subject dates back a year ago when i specifically asked about it on reddit and the short answer was "performance, maybe".
In a larger sense, i see both approaches as very similar in nature. With the key being that client Db is a materialized view of your persisted database. Assuming we have reactive datalog (do we? whats the state of that???) Then i'm some what confused we weren't just building systems that look like datomic queries with some html around them.
In approaching this, im reading through the docs for a lot of projects and i assume ill be doing spikes in them as well as diving into code. None of this is meant to lessen the work anyone is going, rather i assume there are very real trade offs in each approach that matter and mostly this is trying to ferret out the differences because im assuming there enlightening!