35 questions for “Lifecycle Hooks”

Found in 1 field. Select a question to see its full answer.

Information Technology

35 questions in 5 technologies

#QuestionTechnologyTopicLevel
1What are lifecycle hooks in Angular and why would you use them? Angular › Lifecycle HooksAngularLifecycle HooksBeginner
2What is the correct order in which Angular calls the main lifecycle hooks during a component's life? Angular › Lifecycle HooksAngularLifecycle HooksAdvanced
3Why is the constructor generally not the right place to fetch data or perform complex setup in an Angular component? Angular › Lifecycle HooksAngularLifecycle HooksBeginner
4What does ngOnDestroy do, and why is it important for cleaning up resources like subscriptions? Angular › Lifecycle HooksAngularLifecycle HooksIntermediate
5What is the difference between ngOnChanges and ngOnInit, and when does each run? Angular › Lifecycle HooksAngularLifecycle HooksIntermediate
6How do CodeDeploy lifecycle hooks defined in an appspec file control the deployment process? AWS › AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)AWSAWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)Intermediate
7How do lifecycle hooks in Auto Scaling Groups let you customize instance launch and termination behavior? AWS › Auto Scaling GroupsAWSAuto Scaling GroupsAdvanced
8What does componentDidMount do in a class component and what is its equivalent using hooks? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsIntermediate
9What is IHostedLifecycleService, and how does it provide more granular hooks than IHostedService's StartAsync/StopAsync? .NET › Background Services.NETBackground ServicesAdvanced
10How would you use async_hooks (the lower-level predecessor to AsyncLocalStorage) to trace the lifecycle of asynchronous resources in Node.js? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced