Question from the React ⚛️ test

Find the issue with this React code:

Easy
const SomeComponent=({onChange, id})=>{
    const handleClick= useCallback(()=>{
        onChange(id);
  },[]);
 return <button onClick={()=>handleClick()}>Click me!</button>;
};

What are the issues with this code?

Author: Clément DEVOSStatus: PublishedQuestion passed 4061 times
Edit
6
Community EvaluationsNo one has reviewed this question yet, be the first!