Replaced useLayoutEffect with useEffect to remove server-side warning as document in #111. This would enable you to render the Glider on the server-side and then progressively enhance it once the client-side scripts are available.
useLayoutEffect is synchronous and blocks visual updates, so following the change to useEffect, the Glider is initialized after content is painted to the screen.
What's Changing
Replaced
useLayoutEffect
withuseEffect
to remove server-side warning as document in #111. This would enable you to render the Glider on the server-side and then progressively enhance it once the client-side scripts are available.useLayoutEffect
is synchronous and blocks visual updates, so following the change touseEffect
, the Glider is initialized after content is painted to the screen.Dependent on https://github.com/NickPiscitelli/Glider.js/pull/235
Change Type
documentation
patch
minor
major
Marked as a major change since users may see a sudden increase in layout shift as the Glider is initialized later.