For AI agents: the complete documentation index is available at https://rspress.rs/zh/llms.txt, the full documentation bundle is available at https://rspress.rs/zh/llms-full.txt, and this page is available as Markdown at https://rspress.rs/zh/ui/runtime-components/no-ssr.md.
close

NoSSR deprecated

已废弃

NoSSR 已废弃,请使用 BrowserOnly。

NoSSR 用于跳过其子树的服务端渲染。

用法

index.mdx
import { NoSSR } from '@rspress/core/runtime';

<NoSSR>
  <ThirdPartyWidget />
</NoSSR>

另见

  • BrowserOnly — 仅在浏览器 hydration 后渲染内容。