meteor-transactions icon indicating copy to clipboard operation
meteor-transactions copied to clipboard

Page re-renders when using the transaction for updates

Open maitrid opened this issue 8 years ago • 2 comments

In an app using Meteor + React that updates couple of documents after the user submits a form, under normal circumstances, only the relevant component updates, but after implementing tx.start, and tx.commit around the data update calls, the whole page re-renders after form submit. Is there anything that can prevent the whole page re-rendering?

maitrid avatar Aug 29 '17 23:08 maitrid

Ah... yes. The transactions package writes to top-level fields on the document:transaction_id (always) and, for soft deletes only, deleted.

I'm guessing you're editing a field in a sub-document, which means that whole re-render doesn't normally need to happen. Is that the case?

JackAdams avatar Aug 30 '17 03:08 JackAdams

Yes, that's exactly what i'm doing. Thanks!

maitrid avatar Aug 30 '17 23:08 maitrid