You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to get things working quite quickly with the Masonry component, but after reading in the docs that you could avoid the need for a resize observer by using useMasonry I decided to try and switch to that approach.
Unfortunately it's not quite working right, the first few items are being positioned on top of each other. It's not obvious how to go about diagnosing why that is. I'm hoping there's something obvious that I've overlooked that you might be able to point out!
Thanks for the reply! That's what has me confused, as far as I can tell I'm following the same approach as the recipe. My items have fixed aspect ratio, the items in the recipe also resize when the window is resized.
Had the same issue, I've used the same code from the sandbox, the Masonry component was working, when using useMasonry, all items were overlapping. After a while I've checked the code within the Masonry component and notices, that the following fixes the issue:
I managed to get things working quite quickly with the
Masonry
component, but after reading in the docs that you could avoid the need for a resize observer by usinguseMasonry
I decided to try and switch to that approach.Unfortunately it's not quite working right, the first few items are being positioned on top of each other. It's not obvious how to go about diagnosing why that is. I'm hoping there's something obvious that I've overlooked that you might be able to point out!
I put together a small codesandbox: https://codesandbox.io/s/modest-feynman-02o4y9
The text was updated successfully, but these errors were encountered: