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
22 questions for “Props & State”
Found in 1 field. Select a question to see its full answer.
Matching topics
React
Props
&
State
5
React
Component Composition & Children
Props
3
React
State
Management
2
Information Technology
22 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is the difference between
props
and
state
in React?
React › Props & State
React
Props
&
State
Beginner
2
Why is
state
considered the single source of truth for data that changes in a React component?
React › Props & State
React
Props
&
State
Intermediate
3
How does lifting
state
up work in React, and when should you use this pattern?
React › Props & State
React
Props
&
State
Advanced
4
How do you pass data from a parent component to a child component in React?
React › Props & State
React
Props
&
State
Beginner
5
How would you give a prop a default value in case the parent does not pass one?
React › Props & State
React
Props
&
State
Intermediate
6
What is the difference between local
state
and global
state
in a React app?
React › State Management
React
State
Management
Intermediate
7
What is a common sign that an app's
state
management approach needs to be reconsidered?
React › State Management
React
State
Management
Beginner
8
What is the difference between passing a component as a prop and nesting it as children?
React › Component Composition & Children Props
React
Component Composition & Children
Props
Beginner
9
What is the children prop in React and how does it work?
React › Component Composition & Children Props
React
Component Composition & Children
Props
Intermediate
10
How does composition help avoid the problem known as prop drilling?
React › Component Composition & Children Props
React
Component Composition & Children
Props
Intermediate
Show all 22 questions in Information Technology