if you want to use reanimated 2 then go through your installation

Viewed 302

I'm having a problem with a component that takes the state of another component after deleting the first one. I'm trying to debug my React Native application but when I use the "Debug with Chrome" option, the app crashes and I get an error: if you want to use reanimated 2 then go through your installation

The problem is that I went through the installation and I already installed it.

This is my babel.config.js:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['react-native-reanimated/plugin'],
};

I have this line in my package.json:

    "react-native-reanimated": "^2.2.0",

under "dependencies".

and I also did pod install in the iOS directory. I tried to reinstall node_modules and to reinstall the app (running on simulator)

When running the application not in Debug mode, it works fine, but only when trying to debug this error is presented.

2 Answers

You cannot enable debug mode with Reanimated 2. This happens because Reanimated 2 uses Turbo Modules, that have this limitation that doesn't allow you to use debug mode. You can use Flipper for debugging instead

For me I had created my project two years ago before react native switched to a Swift. I rebuilt my project using a new react-native init and copying my info and .m files over.

Related