To use VanillaTilt
we need to get access to a div
so that it can work its magic.
To make this happen we'll learn about React's useRef
and useEffect
methods.
We'll cover:
useRef
useEffect
.init
to assign VanillaTilt
to that DOM nodeuseEffect
with a dependency list to prevent rerendering.