next-learn
next-learn copied to clipboard
Wrong highlighted line in react-foundations, chapter 7
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:".