通过下面的操作,我得到了错误: let [fontsLoaded] = useFonts({/Set states backgroundColor: new Animated.Value(0) this.setStatestates
const [backgroundColor, setBackgroundColor] = useState(ne
我试图在react函数组件中使用update状态,但它不起作用。我试着学习一个关于多元站点的教程,并将它应用到我自己的项目中。理想情况下,这段代码应该根据ID号找到产品,并用新值替换总计。这是我在firefox控制台窗口中得到的错误消息(该消息没有显示在Chrome中)。This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate在本例中,我保存数组的第