All fields

“Props & State” in Information Technology

22 questions across 1 technology.

Information Technology

22 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the difference between props and state in React? React › Props & StateReactProps & StateBeginner
2Why is state considered the single source of truth for data that changes in a React component? React › Props & StateReactProps & StateIntermediate
3How does lifting state up work in React, and when should you use this pattern? React › Props & StateReactProps & StateAdvanced
4How do you pass data from a parent component to a child component in React? React › Props & StateReactProps & StateBeginner
5How would you give a prop a default value in case the parent does not pass one? React › Props & StateReactProps & StateIntermediate
6What is the difference between local state and global state in a React app? React › State ManagementReactState ManagementIntermediate
7What is a common sign that an app's state management approach needs to be reconsidered? React › State ManagementReactState ManagementBeginner
8What is the difference between passing a component as a prop and nesting it as children? React › Component Composition & Children PropsReactComponent Composition & Children PropsBeginner
9What is the children prop in React and how does it work? React › Component Composition & Children PropsReactComponent Composition & Children PropsIntermediate
10How does composition help avoid the problem known as prop drilling? React › Component Composition & Children PropsReactComponent Composition & Children PropsIntermediate
11How do you set and update state correctly inside a class component? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsBeginner
12What does the useState hook do, and how do you use it? React › HooksReactHooksBeginner
13How do you properly pass through extra props when writing a higher order component? React › Higher-Order Components (HOCs)ReactHigher-Order Components (HOCs)Intermediate
14What is a class component in React and how does it differ from a function component? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsBeginner
15What is JSX and why do React developers use it? React › Components & JSXReactComponents & JSXBeginner
16What is a React component and what are the two main types? React › Components & JSXReactComponents & JSXBeginner
17How do you show different content in React depending on a condition? React › Conditional Rendering & Lists (Keys)ReactConditional Rendering & Lists (Keys)Beginner
18What problem does the Context API solve in React? React › Context APIReactContext APIBeginner
19What are hooks in React and why were they introduced? React › HooksReactHooksBeginner
20How do you embed a JavaScript expression inside JSX? React › Components & JSXReactComponents & JSXIntermediate
21What is the controlled component pattern and why is it considered a best practice for forms? React › Design Patterns in ReactReactDesign Patterns in ReactIntermediate
22What is componentDidUpdate used for, and what mistake should you watch out for when using it? React › Class Components & Legacy Lifecycle MethodsReactClass Components & Legacy Lifecycle MethodsAdvanced