Skip to content

refactor: wrap view creation with untracked() and upgrade prettier#33

Merged
arturovt merged 1 commit intomainfrom
fix/untracked
Mar 25, 2026
Merged

refactor: wrap view creation with untracked() and upgrade prettier#33
arturovt merged 1 commit intomainfrom
fix/untracked

Conversation

@arturovt
Copy link
Copy Markdown
Collaborator

Prevents signal reads during view creation from being tracked as reactive dependencies, avoiding unintended re-executions and view recreation:

  • TeleportDirective: wrap createEmbeddedView in untracked() inside the effect; replace DestroyRef.onDestroy with effect's onCleanup to co-locate subscription and view teardown; remove the now-unnecessary dispose() method
  • ViewService: wrap createComponent, createTemplate, and createView bodies in untracked()
  • Upgrade prettier from 2.2.1 to 3.8.1

Prevents signal reads during view creation from being tracked as reactive dependencies, avoiding unintended re-executions and view recreation:

- TeleportDirective: wrap createEmbeddedView in untracked() inside the effect; replace DestroyRef.onDestroy with effect's onCleanup to co-locate subscription and view teardown; remove the now-unnecessary dispose() method
- ViewService: wrap createComponent, createTemplate, and createView bodies in untracked()
- Upgrade prettier from 2.2.1 to 3.8.1
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@arturovt arturovt merged commit 305b6b0 into main Mar 25, 2026
2 checks passed
@arturovt arturovt deleted the fix/untracked branch March 25, 2026 20:36
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

Successfully merging this pull request may close these issues.

1 participant