Usman Sabuwala
Usman Sabuwala

Reputation: 898

You may need an additional loader to handle the result of these loaders when using react-native-reanimated

I have a React Native app that I generated using Expo. And when I installed react-native-reanimated, it gave me this error. Do I have to configure something else with it?

enter image description here

Upvotes: 5

Views: 4853

Answers (4)

Ben Walton
Ben Walton

Reputation: 453

react-native-web seems to only work with "react-native-reanimated": "2.9.1". Expo when upgrading will install "~2.12.0". This breaks web implementation. Downgrading reanimated was the only way I found to fix it.

Upvotes: 4

deepak dev
deepak dev

Reputation: 41

Simply, include the plugin in babel.config.js of the react native project as

@babel/plugin-proposal-export-namespace-from, react-native-reanimated/plugin,

The full code of babel.config.js is:

plugins: [
  '@babel/plugin-proposal-export-namespace-from',
  'react-native-reanimated/plugin',
]

This works correctly for the react native application running on web.

Upvotes: 4

fukit0
fukit0

Reputation: 984

Add babel plugin for react-native-reanimated to your babel.config.js as documented expo's official page:

  module.exports = {
      ...
      plugins: [
          'react-native-reanimated/plugin',
          '@babel/plugin-proposal-export-namespace-from',
          'react-native-reanimated/plugin',
      ],
  };

Upvotes: 5

Raj Madheshia
Raj Madheshia

Reputation: 119

Install react native reanimated

expo install react-native-reanimated

Upvotes: 0

Related Questions