Use useId to match the component to complete the activation #736 #12698
NovaAstra
started this conversation in
General Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an old SPA project, which only has client-side rendering
I want to gradually complete the migration to support server-side rendering, so I extracted a part of the large block components (not pages here) and used renderToString to return from the server
renderToString and createSSRApp provide me with such functions
But I don't want to createSSRApp to create an instance of each component and mount it to the original block component container element when the client is hydrated
Can you provide a more basic API, use useId matching, and activate specific block components on the createSSRApp root instance
我存在一个古老的SPA项目,单纯的只有客户端渲染
我想逐步完成迁移以支持服务端渲染,所以我将一部分大的区块组件(这里不是页面)抽离出去,使用了renderToString 从服务端返回
renderToString 和 createSSRApp 提供了我这样的功能
但是我不想在客户端水合的时候每个组件都去 createSSRApp 创建实例挂载到原来的区块组件容器元素上
是否可以提供一个更基础的API,使用useId 匹配,在createSSRApp 根实例上激活特定的区块组件
Beta Was this translation helpful? Give feedback.
All reactions