top | item 33876163 (no title) Julien_r2 | 3 years ago Very well explained, with nice little animations to toggle on the way !For those copying/getting inspired by the code, don't forget to add the missing empty-array for the useLayoutEffet dependency param. discuss order hn newest leodriesch|3 years ago That would measure the component only on mount, so it would not notice if it’s layout changed.You need to run it without the dependency array or add all layout-changing props and state to it.
leodriesch|3 years ago That would measure the component only on mount, so it would not notice if it’s layout changed.You need to run it without the dependency array or add all layout-changing props and state to it.
leodriesch|3 years ago
You need to run it without the dependency array or add all layout-changing props and state to it.