Closure on the result of a `useState` hook causes annoying behaviour

前端 未结 0 745
余生分开走
余生分开走 2021-02-04 14:05

I have a component like this:

const MyInput = ({ defaultValue, id, onChange }) => {

  const [value, setValue] = useState(defaultValue);
  const handleChange =         


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