TypeError: (0, _taroRn.useState) is not a function
-
Taro版本:v1.3.25
代码:export default (props) => { const activityDesc = props[activityDescKey]; const [showIntroduce, setShowIntroduce] = useState(false); const showIntro = () => setShowIntroduce((prev) => !prev); .... }
上面这个组件在weapp和h5里面都正常运行,但是在rn中运行时报错
TypeError: (0, _taroRn.useState) is not a function
貌似taro没有在rn中对hooks进行处理?
-
刚刚在群里面问了,这个功能需要RN的版本>=0.59.0才支持
-
React Hooks