feat(Portal): portal support lazy #2826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
目前 一些组件的
Portal
在页面直接就渲染,首页挂载就渲染,导致一些性能损失,所以添加lazyforceRender api
来优化性能(使用react-transition-group
的 mountOnEnter react-transition-group ,默认就启动lazy
),初次不会直接渲染,后续渲染会只改变组件的visable
,顺便兼容SSR
渲染导致的Hydrate
问题📝 更新日志
feat(Portal):
Portal
支持懒加载forceRender api
,默认就是lazy模式 ,优化性能,兼容SSR
渲染本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单