Moti + Next.js
There are 2 quick steps to getting Moti setup in a Next.js app.
#
Step 1Add moti
to transpile modules.
Your next.config.js
file should look something like this:
#
Step 2Add the raf
polyfill.
yarn add raf
Then add this in pages/_app.js
We're going to use requestAnimationFrame
with Reanimated web, so that polyfill makes it usable with server-side rendering frameworks.