Web Support
Moti works on all platforms, including Web. Make sure you've installed react-native-web.
Expo Web support#
The following applies to React Native Web apps that do not use Next.js.
Expo Web should work out of the box.
Install @expo/webpack-config to your devDependencies:
- npm
- Yarn
Then run yarn web and you're done!
Troubleshooting#
If you get the following Reanimated error in your console: ReferenceError: _frameTimestamp is not defined, you can add add this to App.js at the top:
This should go away in Reanimated v3. See react-native-reanimated#3355.
Vanilla React Native Web#
You may need to add a custom webpack.config.js to your project and export the config from @expo/webpack-config.