我在学习RN的时候遇到一个问题,在按照官方教程学习抽屉的时候,却收到报错:isConfigured is not defind,这让我一脸懵逼。
参照官方代码,我什么也不差,为什么就报错了呢?
后来在报错的地方提示了一个网址,我尝试打开,在此之前我一直以为是drawer的错,但其实不是。
网址如下
https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting/#failed-to-create-a-worklet
文章中提示我
Solution: Try resetting your Metro bundler cache with yarn start --reset-cache, npm start -- --reset-cache or expo start -c and run the app again.
所以我停掉服务,执行了npm start -- --reset-cache
成功启动项目,无报错。
但相信很多同学也会错过一些必要的设置,这时候阅读官方的文档很有必要,一定要按照教程,不要错过任何一个步骤!