Skip to content

Instantly share code, notes, and snippets.

@devknoll
Created September 18, 2023 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devknoll/9cb767d66cb85aa6b3868431f0a9b6ec to your computer and use it in GitHub Desktop.
Save devknoll/9cb767d66cb85aa6b3868431f0a9b6ec to your computer and use it in GitHub Desktop.
@Component({/* ... */})
export class MyComponent {
constructor() {
afterRender(() => {
// Run after *each* render
}, {phase: AfterRenderPhase.Write});
afterNextRender(() => {
// Run after the *next* render
}, {phase: AfterRenderPhase.Write});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment