Can we use a string to reference/call state?

前端 未结 0 438
深忆病人
深忆病人 2021-01-13 05:24

I have a variable that stores a dynamic state name and would like to do something like this:

function App() {
  const [state, setState] = useState("this          


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