How to update an array using setState with React Hooks on Strict Mode

后端 未结 0 1191
花落未央
花落未央 2020-12-05 05:53

I have this, every time addEmail is called, the updater callback for setEmails is called twice and therefore the new email is added twice:<

相关标签:
回答
  • 消灭零回复
提交回复
热议问题