Fork me on GitHub
#re-frame
<
2022-11-24
>
Kein07:11:23

hi! Can reframe store transaction history when the DB itself cannot? (such as datalevin https://github.com/juji-io/datalevin) I was reading the 4th point here about the undo-redo. http://day8.github.io/re-frame/application-state/#the-benefits

p-himik08:11:13

It can store DB transactions in the DB itself, in some special "untransactional" key.

Kein09:11:15

Do you mean re-frame automatically help store extra snapshots in the db, even if the db doesn’t store the snapshots itself? Where can I find the untransactional key in the docs? (What’s the naming of the functions related to untransactional key?)

p-himik09:11:58

No, there's no automation. But you can implement it yourself with a global interceptor.

Kein09:11:41

I see, I’ll take a look at it : D

👍 1
p-himik09:11:14

Alternatively, it might be better to keep the history in a separate atom/ratom. Depends on what exactly you want to do with that history. Also, it intrinsically creates a memory leak unless you prune that history somehow.

👀 1
Kein08:11:09

thanks 😁