We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package版本{ "hox": "2.0.0-rc.0", "next": "13.4.4", } 还没开始配置store,请问该组件是不支持在next上使用吗
The text was updated successfully, but these errors were encountered:
发现一个临时解决办法:
新增一个组件:
import { PropsWithChildren, useEffect, useState, } from 'react' export default function ClientRunWrapper({children}: PropsWithChildren) { const [show, setShow] = useState(false); useEffect(() => { setShow(true); }, []) if (!show) { return null; } return children; }
用此组件包裹使用了 hox 的顶层组件,如:
hox
"use client" import ClientWrapper from "@/components/ClientWrapper"; export default function Page() { return <div style={{ height: '100%', padding: 16, backgroundColor: '#fff', overflow: 'auto', }}> <ClientWrapper> <TableContent /> </ClientWrapper> </div> }
这样,next dev 会报错,但是可以执行next build了。(否则next build都会失败)
Sorry, something went wrong.
发现一个临时解决办法: 新增一个组件: import { PropsWithChildren, useEffect, useState, } from 'react' export default function ClientRunWrapper({children}: PropsWithChildren) { const [show, setShow] = useState(false); useEffect(() => { setShow(true); }, []) if (!show) { return null; } return children; } 用此组件包裹使用了 hox 的顶层组件,如: "use client" import ClientWrapper from "@/components/ClientWrapper"; export default function Page() { return <div style={{ height: '100%', padding: 16, backgroundColor: '#fff', overflow: 'auto', }}> <ClientWrapper> <TableContent /> </ClientWrapper> </div> } 这样,next dev 会报错,但是可以执行next build了。(否则next build都会失败)
这样不就是不要ssr吗,我最后还是换了个组件,毕竟这样的话直接不用next会更好o(╥﹏╥)o
No branches or pull requests
package版本{
"hox": "2.0.0-rc.0",
"next": "13.4.4",
}
还没开始配置store,请问该组件是不支持在next上使用吗
The text was updated successfully, but these errors were encountered: