For anyone using Datascript on the frontend: added tuple values & pull-many
to posh "0.5.7"
& re-posh "0.3.1"
. Thanks to denistakeda for taking over Posh maintenance & cutting these releases.
https://github.com/denistakeda/posh
https://github.com/denistakeda/re-posh
Thats great. I'm going to try and evaluate a small project using re-posh. At the same time as fulcro. Re-posh has the same interaction with react's framework as re-frame right?
@drewverlee Can you clarify the question? (Re-posh doesn't interact with re-frame directly. It just provides the "re-frame wiring" over Posh & re-frame. Posh is the underlying library provides the "reactive atoms" over Datascript. Re-frame is the only piece that touches react [through its own dependency, Reagent.])
I see, I temporarily forgot that reframe has nothing to do with react really. So my question was confusing in two ways. I suppose im curious how the reactive atoms are built.
I don't think I could give a satisfactory answer on that, as there's quite a bit of magic going on there still for me. I did a bit of digging though:
Posh references reagent.ratom/make-reaction.
https://github.com/denistakeda/posh/blob/master/src/posh/reagent.cljc#L21
Posh's own usage of make-reaction: https://github.com/mpdairy/posh/blob/413337f07a564fa35c731b8d00d5cf511cd6609c/src/posh/plugin_base.cljc#L90
Reagent writeup on how reactions work: https://github.com/reagent-project/reagent/blob/d28b16e11d7f3500e490563f1ea0a615354b5478/doc/ManagingState.md#reactions
Code definition of make-reaction
:
https://github.com/reagent-project/reagent/blob/88e9833be9c3135548d760286ffd84d88a0a0489/src/reagent/ratom.cljs#L512
Exactly how Posh applies the usage of make-reaction isn't clear to me, though you can see that it uses it to deregister tracking some queries whenever a reaction is disposed