Fork me on GitHub
#datascript
<
2018-06-13
>
denis_krivosheev09:06:56

Hi guys. I’m so exited about datascript and rum, thank you @tonsky for the great work! The only thing I can’t figure out is how to make them work together? Is there a standartized way? I know that I can just inject reactive mixin inside the component, but I don’t want to rerender everything every time something changed in the database, I don’t even want to execute all the queries all the time. Any suggestions?

tonsky09:06:14

I found out that in practice entities work much better than queries. As of rerendering everything every time, you’ll have to roll out your own solution

denis_krivosheev09:06:09

Yeah, that’s what I thought. Thank you for answer @tonsky

danielstockton14:06:34

Any thoughts on how such a solution might look?

petterik15:06:29

I'm attempting it with a new om.next inspired library where the parser only runs queries that matter. It'll hopefully incrementally update both queries and pulls when I'm done. I have taken on quite a lot of stuff, but it's getting closer to being usable. om.next parser library - http://github.com/petterik/lajt om.next-like library - http://github.com/petterik/lajter

danielstockton15:06:03

I'm thinking a love child of om.next and datascript. Yep @petterik, thanks for the reminder to check these out in more detail.

petterik15:06:33

The lajter stuff is new. Was going to make it usable before I told you

petterik15:06:43

:man-shrugging:

danielstockton15:06:18

lajter is your take on om.next, with lajt ideas integrated?

petterik15:06:05

lajter is my take on om.next, yes. lajt is the parser.

petterik15:06:15

will most likely rename lajter

petterik15:06:27

got to go 👋

👍 1
petterik16:06:27

Also, @denis_krivosheev since we're on the topic of frontend libraries that work with datascript: There was recently a new release of re-posh (https://github.com/denistakeda/re-posh) - if you want to try out datascript and re-frame. Or just posh (https://github.com/mpdairy/posh) - datascript and reagent