Fork me on GitHub

@achikin What’s wrong with an interceptor that would add to the :db (if it exists) fx in :after?


I haven’t tested it so it might not work straight away.


Yes, I know that technique. My initial challenge was to make it more reactive e.g. you should not stick a callback/interceptor in every place where you update the data.


Yes, you're right. That's why I'm probably not going to use it in production code. Is there any way I can make it more like watcher without such tricks?


@achikin wouldn’t it also be possible to keep a separate copy of the form input in the db and then compare those two in a subscription to see if the form input has changed?


Yes, I'd probably take this path in the future. More generally speaking this leads to full-fledged undo functionality which is a bit overwhelming for me right now.


Well you can undo all changes at once by replacing the form data with the original data. But not have a step by step undo.


The subscription to enable the save button will be a simple (not= (:form db) (:original-form db))