React Fundamentals

React Fundamentals Quiz

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is React?

  1. A JavaScript library for building user interfaces
  2. A programming language for web development
  3. A framework for building mobile applications
  4. A tool for creating 3D graphics
Question 2 Multiple Choice (Single Answer)

What is the main concept behind React?

  1. Virtual DOM
  2. Component-based architecture
  3. Declarative programming
  4. All of the above
Question 3 Multiple Choice (Single Answer)

What is the purpose of the virtual DOM in React?

  1. To improve performance
  2. To make the code more readable
  3. To make the code more maintainable
  4. To make the code more portable
Question 4 Multiple Choice (Single Answer)

What is a component in React?

  1. A reusable piece of code that renders a UI
  2. A function that returns a UI
  3. A class that defines a UI
  4. All of the above
Question 5 Multiple Choice (Single Answer)

What is the difference between a class component and a functional component in React?

  1. Class components use state and lifecycle methods, while functional components do not
  2. Class components are more performant than functional components
  3. Functional components are more reusable than class components
  4. Functional components are easier to write than class components
Question 6 Multiple Choice (Single Answer)

What is the purpose of props in React?

  1. To pass data from a parent component to a child component
  2. To pass data from a child component to a parent component
  3. To share data between components
  4. To store data in a component
Question 7 Multiple Choice (Single Answer)

What is the purpose of state in React?

  1. To store data that can change over time
  2. To store data that is passed from a parent component
  3. To share data between components
  4. 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?

  1. Controlled components are updated by the state of the component, while uncontrolled components are updated by the user
  2. Controlled components are more performant than uncontrolled components
  3. Uncontrolled components are more reusable than controlled components
  4. Uncontrolled components are easier to write than controlled components
Question 9 Multiple Choice (Single Answer)

What is the purpose of a key in React?

  1. To identify each item in a list
  2. To improve performance
  3. To make the code more readable
  4. To make the code more maintainable
Question 10 Multiple Choice (Single Answer)

What is the purpose of a context in React?

  1. To share data between components
  2. To pass data from a parent component to a child component
  3. To store data in a component
  4. To improve performance
Question 11 Multiple Choice (Single Answer)

What is the purpose of a hook in React?

  1. To add functionality to a component
  2. To improve performance
  3. To make the code more readable
  4. 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?

  1. Class hooks are used in class components, while function hooks are used in functional components
  2. Class hooks are more performant than function hooks
  3. Function hooks are more reusable than class hooks
  4. Function hooks are easier to write than class hooks
Question 13 Multiple Choice (Single Answer)

What is the purpose of a reducer in React?

  1. To update the state of a component
  2. To pass data from a parent component to a child component
  3. To share data between components
  4. To improve performance
Question 14 Multiple Choice (Single Answer)

What is the difference between a synchronous and an asynchronous action in React?

  1. Synchronous actions are executed immediately, while asynchronous actions are executed after a delay
  2. Synchronous actions are more performant than asynchronous actions
  3. Asynchronous actions are more reusable than synchronous actions
  4. Asynchronous actions are easier to write than synchronous actions
Question 15 Multiple Choice (Single Answer)

What is the purpose of a middleware in React?

  1. To intercept and modify actions before they reach the reducer
  2. To update the state of a component
  3. To pass data from a parent component to a child component
  4. To share data between components