admin管理员组文章数量:1410674
I'm using TinaCMS in Next.js 15.
I'd like to use Tina's contextual editing but I would also like to have Next.js to compile the components server side, at build time.
However, if I want to use the tinaField
helper it seems I have to use a useTina
hook which requires "use client".
import { useTina, tinaField } from 'tinacms/dist/react'
const Page = (props) => {
const { data } = useTina(props)
return (
<div>
<h1 data-tina-field={tinaField(data, 'title')}>{data.title}</h1>
</div>
)
}
Is there anyone who dealt with this issue and knows a solution?
本文标签: javascriptUse finafield helper in nextjs server componentStack Overflow
版权声明:本文标题:javascript - Use finafield helper in next.js server component - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744937907a2633301.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论