In my app, I have a table that is loaded from MongoDB and which allows the user to do in-line editing.
Currently, I am just subscribing to the database(s) and sending the changes directly there. This precludes any kind of undo operation, but it makes state alterations incredibly easy.
I could store the last 3 operations on a stack and just apply the converse when an undo button is pressed, but I was wondering if there was a proper way to do it in Mongo/Meteor?
You may find one of these solutions to be helpful:
https://atmospherejs.com/babrahams/transactions
https://atmospherejs.com/adain/meteor-command-pattern
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With