NextJs / Basics / Function
Function
-
Step
1. define a function inside the class
const handleClick = () => { console.log('Click happened'); }; 2. function call
'use client' import React from 'react'; export default function Home() { const handleClick = () => { console.log('Click happened'); }; return ( Hello React.
Start editing to see some magic happen!