Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement undoable MongoDB transaction in Meteor/React

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?

like image 276
adinutzyc21 Avatar asked Mar 02 '26 15:03

adinutzyc21


1 Answers

You may find one of these solutions to be helpful:

https://atmospherejs.com/babrahams/transactions

https://atmospherejs.com/adain/meteor-command-pattern


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!