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
26 questions for “Effects & Lifecycle”
Found in 1 field. Select a question to see its full answer.
Matching topics
React
Effects
&
Lifecycle
5
React
Class Components & Legacy
Lifecycle
Methods
2
Information Technology
26 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is the difference between useEffect and code that runs directly during rendering?
React › Effects & Lifecycle
React
Effects
&
Lifecycle
Beginner
2
How would you fetch data safely inside useEffect while avoiding a common bug called a race condition?
React › Effects & Lifecycle
React
Effects
&
Lifecycle
Advanced
3
What is the useEffect hook used for in React?
React › Effects & Lifecycle
React
Effects
&
Lifecycle
Beginner
4
What does the dependency array in useEffect actually control?
React › Effects & Lifecycle
React
Effects
&
Lifecycle
Intermediate
5
How do you clean up an effect in React, and why is it important?
React › Effects & Lifecycle
React
Effects
&
Lifecycle
Intermediate
6
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
7
What is componentDidUpdate used for, and what mistake should you watch out for when using it?
React › Class Components & Legacy Lifecycle Methods
React
Class Components & Legacy
Lifecycle
Methods
Advanced
8
Why does Strict Mode call component functions and certain
effects
twice during development?
React › Strict Mode & Concurrent Features
React
Strict Mode & Concurrent Features
Intermediate
9
What is a custom hook in React and why would you create one?
React › Custom Hooks
React
Custom Hooks
Beginner
10
What problem do libraries like React Query and SWR solve compared to fetching data with plain useEffect?
React › Data Fetching (React Query & SWR)
React
Data Fetching (React Query & SWR)
Beginner
Show all 26 questions in Information Technology