What's the react hooks equivalent of the following snippet?

前端 未结 0 2025

I\'m trying to convert the following setState function to React Hooks

const setUserAnswer = (answer) => {
     this.setState((state) => ({
       answer         


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