Questions
Question 1 Multiple Choice (Single Answer)
What is React?
- A JavaScript library for building user interfaces
- A programming language for web development
- A framework for building mobile applications
- A tool for creating 3D graphics
Question 2 Multiple Choice (Single Answer)
What is the main concept behind React?
- Virtual DOM
- Component-based architecture
- Declarative programming
- All of the above
Question 3 Multiple Choice (Single Answer)
What is the purpose of the virtual DOM in React?
- To improve performance
- To make the code more readable
- To make the code more maintainable
- To make the code more portable
Question 4 Multiple Choice (Single Answer)
What is a component in React?
- A reusable piece of code that renders a UI
- A function that returns a UI
- A class that defines a UI
- All of the above
Question 5 Multiple Choice (Single Answer)
What is the difference between a class component and a functional component in React?
- Class components use state and lifecycle methods, while functional components do not
- Class components are more performant than functional components
- Functional components are more reusable than class components
- Functional components are easier to write than class components
Question 6 Multiple Choice (Single Answer)
What is the purpose of props in React?
- To pass data from a parent component to a child component
- To pass data from a child component to a parent component
- To share data between components
- To store data in a component
Question 7 Multiple Choice (Single Answer)
What is the purpose of state in React?
- To store data that can change over time
- To store data that is passed from a parent component
- To share data between components
- To store data in a component
Question 8 Multiple Choice (Single Answer)
What is the difference between a controlled component and an uncontrolled component in React?
- Controlled components are updated by the state of the component, while uncontrolled components are updated by the user
- Controlled components are more performant than uncontrolled components
- Uncontrolled components are more reusable than controlled components
- Uncontrolled components are easier to write than controlled components
Question 9 Multiple Choice (Single Answer)
What is the purpose of a key in React?
- To identify each item in a list
- To improve performance
- To make the code more readable
- To make the code more maintainable
Question 10 Multiple Choice (Single Answer)
What is the purpose of a context in React?
- To share data between components
- To pass data from a parent component to a child component
- To store data in a component
- To improve performance
Question 11 Multiple Choice (Single Answer)
What is the purpose of a hook in React?
- To add functionality to a component
- To improve performance
- To make the code more readable
- To make the code more maintainable
Question 12 Multiple Choice (Single Answer)
What is the difference between a class hook and a function hook in React?
- Class hooks are used in class components, while function hooks are used in functional components
- Class hooks are more performant than function hooks
- Function hooks are more reusable than class hooks
- Function hooks are easier to write than class hooks
Question 13 Multiple Choice (Single Answer)
What is the purpose of a reducer in React?
- To update the state of a component
- To pass data from a parent component to a child component
- To share data between components
- To improve performance
Question 14 Multiple Choice (Single Answer)
What is the difference between a synchronous and an asynchronous action in React?
- Synchronous actions are executed immediately, while asynchronous actions are executed after a delay
- Synchronous actions are more performant than asynchronous actions
- Asynchronous actions are more reusable than synchronous actions
- Asynchronous actions are easier to write than synchronous actions
Question 15 Multiple Choice (Single Answer)
What is the purpose of a middleware in React?
- To intercept and modify actions before they reach the reducer
- To update the state of a component
- To pass data from a parent component to a child component
- To share data between components