我在 nextjs 13.5.4 中编写了一行简单的代码,涉及一个函数,该函数在调用时应该 console.log 但 onclick 函数似乎没有被触发 我没有收到任何错误或错误,我尝试了不同的技术,但它仍然不起作用
"use client"
import { Button } from "semantic-ui-react"
export default function test () {
function clicks (event){
console.log("hello am working")
}
return (
<>
<Button onClick={clicks}>click</Button>
</>
)
} ```
您正在查看终端控制台还是浏览器控制台?这将出现在浏览器控制台上。