next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Wrong highlighted line in react-foundations, chapter 7

Open thetillhoff opened this issue 5 months ago • 0 comments

In https://nextjs.org/learn/react-foundations/updating-state#handling-events, In the second code snippet

function HomePage() {
  // 	...
  function handleClick() {
    console.log('increment like count');
  }
 
  return (
    <div>
      {/* ... */}
      <button onClick={handleClick}>Like</button>
    </div>
  );
}

the wrong line is highlighted. Currently it's the console.log line, but it should be the <button ... line, as described in the sentence above it: "Then, you can call the handleClick function when the onClick event is triggered:".

thetillhoff avatar Aug 31 '24 10:08 thetillhoff