I had to face a similar problem in which I wanted to remasonrize (if you like) after each show / hide div switch.
In my case, I had component A as a parent (with component <Masonry>) and components B1, B2 ... Bn inside it.
Each time I switch (in your case, resizing) to B1, B2 ... Bn, it updates state A, causing the Freemasonry component to display again.
If you post a sample code, I can help you with the exact code.
source
share