[英]Why does the function inside onLoad not execute in my nextjs project
I was learning nextjs on nextjs.org and did what I read on the tutorial but it doesn't work.我在 nextjs.org 上学习 nextjs 并做了我在教程中阅读的内容,但它不起作用。 ....why is the function inside onLoad not executing?
....为什么 onLoad 里面的 function 没有执行?
import Link from 'next/link'; import Head from 'next/head'; import Script from 'next/script'; const FirstPost = () => { return ( < div > < Head > < title > BlogPost < /title> < Script src = "https://connect.facebook.net/en_US/sdk.js" strategy = "lazyOnload" onLoad = { () => { console.log("script loaded successfully"); } } /> < /Head> < h3 > first blog post in my next.js project < /h3> < Link href = "/" > < h2 > Go home < /h2></Link > < /div> ) } export default FirstPost;
本文暂无回复,试试以下方法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.