Is it a correct approach to pass useState setter to a child for updating parents state?

前端 未结 0 1249
抹茶落季
抹茶落季 2020-12-14 13:41

We can pass a callback to a child as props and update the state but I was just wondering can I pass useState setter to the child and call it directly in child to update pare

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