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 tried to use 'react-masonry-component' but found very strange behaviour (as for me). Wrapping with <React.StrictMode> breaks masonry - it does not set any positioning.
Layout with and without StrictMode:
Inline styles with and without StrictMode:
It can be fixed by adding { position: relative } to a parent and { position: absolute } to children, but it's a dirty fix: also masonry stops rebuilding on resize, you need to trigger the layout function. Any ideas?
Thanks for helping us fix our issue too! We upgraded to React 18 and got the same issue.
Using "position: relative" on the parent's "style" property didn't work. It worked when using a class in className (in our case, tailwind "relative").
Hello, everyone!
I tried to use 'react-masonry-component' but found very strange behaviour (as for me). Wrapping with
<React.StrictMode>
breaks masonry - it does not set any positioning.Layout with and without StrictMode:
Inline styles with and without StrictMode:
It can be fixed by adding
{ position: relative }
to a parent and{ position: absolute }
to children, but it's a dirty fix: also masonry stops rebuilding on resize, you need to trigger the layout function. Any ideas?Reproduced in Codesandbox
The text was updated successfully, but these errors were encountered: