React / Meteor - 在Autoform钩子里调用this.setState

问题描述 投票:0回答:1

我想在提交Meteor autoform时修改React组件的状态。我的代码如下。我知道它与范围有关,但是我已经摆弄了我调用this.setState的地方和方式,似乎没什么用。提前致谢! enter image description here

javascript reactjs meteor meteor-autoform
1个回答
0
投票

弄清楚了!只需要重新分配“这个”。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.