W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
35 questions for “Lifecycle Hooks”
Found in 1 field. Select a question to see its full answer.
Matching topics
Angular
Lifecycle
Hooks
5
React
Effects &
Lifecycle
4
React
Class Components & Legacy
Lifecycle
Methods
3
React
Custom
Hooks
3
React
Hooks
2
React
Concurrent
Hooks
(useTransition, useDeferredValue & useLayoutEffect)
1
Information Technology
35 questions in 5 technologies
#
Question
Technology
Topic
Level
1
What are
lifecycle
hooks
in Angular and why would you use them?
Angular › Lifecycle Hooks
Angular
Lifecycle
Hooks
Beginner
2
What is the correct order in which Angular calls the main
lifecycle
hooks
during a component's life?
Angular › Lifecycle Hooks
Angular
Lifecycle
Hooks
Advanced
3
Why is the constructor generally not the right place to fetch data or perform complex setup in an Angular component?
Angular › Lifecycle Hooks
Angular
Lifecycle
Hooks
Beginner
4
What does ngOnDestroy do, and why is it important for cleaning up resources like subscriptions?
Angular › Lifecycle Hooks
Angular
Lifecycle
Hooks
Intermediate
5
What is the difference between ngOnChanges and ngOnInit, and when does each run?
Angular › Lifecycle Hooks
Angular
Lifecycle
Hooks
Intermediate
6
How do CodeDeploy
lifecycle
hooks
defined in an appspec file control the deployment process?
AWS › AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)
AWS
AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)
Intermediate
7
How do
lifecycle
hooks
in Auto Scaling Groups let you customize instance launch and termination behavior?
AWS › Auto Scaling Groups
AWS
Auto Scaling Groups
Advanced
8
What does componentDidMount do in a class component and what is its equivalent using
hooks
?
React › Class Components & Legacy Lifecycle Methods
React
Class Components & Legacy
Lifecycle
Methods
Intermediate
9
What is IHosted
Lifecycle
Service, and how does it provide more granular
hooks
than IHostedService's StartAsync/StopAsync?
.NET › Background Services
.NET
Background Services
Advanced
10
How 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 IO
Node.js
Event Loop & Non-blocking IO
Advanced
Show all 35 questions in Information Technology