【发布时间】:2022-01-18 10:49:38
【问题描述】:
我遇到了 React-native-Reanimated 的问题。
收到“Reanimated 2 未能创建worklet,可能你忘了添加Reanimated 的babel 插件?,js 引擎:hermes”
但是我已经关注了https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation
这是我的复活版:
"react-native-reanimated": "^2.3.0"
这是我的 babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
请帮我解决这个问题。非常感谢
【问题讨论】:
-
我今天也遇到了同样的问题,原来我的 babel config 没有包含
plugins: ['react-native-reanimated/plugin'],,所以添加后就可以了! -
我已经添加了,但是现在运行了,只是……不知道发生了什么