Closed onmax closed 1 week ago
Thank you for your support of hero-motion
There may be a bug here, as we hope that hero-motion
can be used in both client
and server
For resolve the warning of MutationObserver
in server env, we have referenced this PR and added check in useStyle
, because return an undefind
value in useLayout
makes it completely unusable in an SSR environment (although, in reality, this only affects issues with child element scaling)
I will attempt to resolve this issue in the next major version, make hero-motion
available in SSR mode.
Thank you for this PR!
useStyle
usesMutationObserver
which causes an error when using SSR.The current workaround is using
<ClientOnly />
component.Not sure if this is a good solution as I am not familiar with the codebase, but feel free to close this PR if using
<ClientOnly />
is what we want.Thanks for this great library 🫰