Prevent rendering all but the active view?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- react-native, typescript
调研方向
未指定源文件或测试。首先复现 offscreenPageLimit 设置为 1 的六页 PagerView 案例,包括页面之间的导航,并将其性能与单独渲染的页面以及 react-native-swiper 进行比较。完成标准应是:通过一个明确的实现或有文档记录的建议,展示出已验证的渲染行为。
由索引模型根据 Issue 内容生成。
描述
Hi, first of all, thanks for the great work!🙂
I want to use your PagerView to create a sign-up/onboarding process with a number forms one after the other. It works well but I notice that it renders all of the offscreen views as well and rendering all those components is making my app sluggish. I tried setting offscreenPageLimit to 1 but it still renders all six of my pages.
Would it be possible to somehow render only the active page? As moving between pages is expected to be relatively infrequent when compared to other uses, it would be nice to optimize it in this way.
If not, do you have any recommendations for alternative components/libraries I could use to achieve this? I don't want to use the expo-router as the slide in animation is slow and lags.
Edit: It may not be entirely a rendering issue, as I noticed if I don't move between the pages, only the active page is rendered. But for some reason, performance degrades with the number pages and the content within them. The same performance issues weren't there in something like react-native-swiper (which I believe is built on top of a ScrollView 😅) and it's not the pages themselves as individually rendered they're performant.
- 主要语言
- TypeScript
- 星标
- 3.4k
- 派生
- 485
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 24
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/react-native-pager-view 的其他 Issue
-
iOS: PagerScrollDelegate proxies to itself and overflows the stack when the weak originalDelegate dies可能已有人在做 @lvlrSajjad 于 35 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
callstack/react-native-pager-view#1146 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
callstack/react-native-pager-view#1144 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
callstack/react-native-pager-view#1141 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
callstack/react-native-pager-view#1099 · 8 条评论 · 3 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
callstack/react-native-pager-view#1081 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
查看 callstack/react-native-pager-view 的全部 Issue
相似的 Issue
-
The inspector never shows the instances field, so scaling out is unreachable可能已有人在做 @Mrkewl 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
xevrion/breakscale#96 ·
维护者通常 4 天内回复
-
Object parameters lose their structure when resources is enabled可能已有人在做 @asts-top 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
rossant/awesome-math#199 ·
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
jaegertracing/jaeger-ui#4618 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
mifi/lossless-cut#3125 ·
维护者通常 1 天内回复