Skip to content
New issue

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

小程序app.js 中注册的 page 每次在微信小程序编译的时候,所有的 page 都会主动render一次 #3512

Closed
liweiSm opened this issue Jun 23, 2019 · 4 comments
Labels
question Further information is requested

Comments

@liweiSm
Copy link

liweiSm commented Jun 23, 2019

Feature Request 请提到 FeatHub

Taro 使用上的问题请提到 Taro 社区——让每一次交流被沉淀

如果是提交 bug,请搜索文档和 issue,确认以下事项:

  • 该问题没有在其他 issue 和文档讨论到,不属于重复内容

  • 分割线以下的模板除了「 补充信息」每一样都必填

如果不满足以上两点要求的 bug 报告,issue 会被直接关掉。

请多多理解,您现在的不便将会使 Taro 开发者更高效地定位你的问题,修复你的问题。像你一样的 Taro 的使用者也可以通过搜索找到你提供的 bug,对各方都有很大好处。

🙏🙏🙏
阅读完后请在提交的issue中删除以上内容,包括分割线。

问题描述
app.js 中配置项中注册的 pages 每次在小程序(微信)编译过程中每个page都会被主动render而不是只render当前页,如果过多页面,内容太多会导致小程序编译异常 Maximum call stack size exceeded

复现步骤
[复现问题的步骤]

  1. 每个被注册的page的render中都console一段文字
  2. 编译代码
  3. 编译器中会打印所有已注册的page中render console的内容

image

社区中有求助,没人解答。。 社区地址:https://taro-club.jd.com/topic/144/%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%AF%8F%E6%AC%A1%E7%BC%96%E8%AF%91%E9%83%BD%E4%BC%9A%E5%AF%BC%E8%87%B4%E6%89%80%E6%9C%89%E5%B7%B2%E6%B3%A8%E5%86%8C%E7%9A%84page%E9%83%BDrender/2

仓库地址:
https://github.com/liweiSm/myapp.git

系统信息

  • 操作系统: [e.g. Windows 10]
  • Taro 版本 1.3.2 (cli)
  • Node.js 版本 12.1.0
  • 报错平台 [ weapp]

补充信息
群里有老铁说这个问题官网有解答,但是我找半天没找到
[根据你的调查研究,出现这个问题的原因可能在哪里?]

@taro-bot
Copy link

taro-bot bot commented Jun 23, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@masteroy
Copy link

我觉得你可以参考一下这个: #3343

@luckyadam luckyadam added answered question Further information is requested labels Jun 24, 2019
@taro-bot
Copy link

taro-bot bot commented Jun 24, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants