DEV Community

Thomas Wink
Thomas Wink

Posted on • Edited on

React modal dialog re-renders parent component

Hi All,

I have a parent component with reactive vars that are populated with data from a Mongo collection. The child modal dialog modifies this information, causing a re-render of the parent component — and also the modal dialog.

Obviously the modal dialog shouldn't be re-rendered. I tried lifting the open/close state to the parent, but the re-renders still occur.

What are ways that I can prevent this from happening?

Thanks in advance!

Top comments (0)