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

Publishing Changes from Within View Updates Not Allowed in Renderer.swift #58

Open
dioneea-sabs opened this issue Mar 15, 2025 · 0 comments

Comments

@dioneea-sabs
Copy link

In Renderer.swift, the renderSync function modifies state variables (isRendering, blocks, and rendered) while rendering, which triggers SwiftUI’s warning:

“Publishing changes from within view updates is not allowed, this will cause undefined behavior.”

This happens at the following lines:
• isRendering = true (line 151)
• blocks = renderedBlocks (line 161)
• isRendering = false (line 162)
• rendered = true (line 163)

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

No branches or pull requests

1 participant