wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 17 React.js Question Bank - Extraction

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: ReactJS is a back-end JavaScript framework.

a)

True

b)

False

2.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: React was developed by Facebook.

a)

True

b)

False

3.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: React is primarily used for building single-page applications.

a)

True

b)

False

4.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: React uses a virtual DOM to improve performance.

a)

True

b)

False

5.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: React compares the virtual DOM with the real DOM to determine changes.

a)

True

b)

False

6.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: The virtual DOM updates the entire real DOM on every state change.

a)

True

b)

False

7.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: Virtual DOM improves performance by minimizing direct DOM manipulations.

a)

True

b)

False

8.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: Node.js is required to run a React application.

a)

True

b)

False

9.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: Vite is the only tool you can use to create React apps.

a)

True

b)

False

10.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: npm create vite@latest is the command to start a new Vite project.

a)

True

b)

False

11.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: You must restart the development server after every file change.

a)

True

b)

False

12.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: The App.jsx file is the root component in a new React project.

a)

True

b)

False

13.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: React components can only return one root element.

a)

True

b)

False

14.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: JSX stands for JavaScript XML.

a)

True

b)

False

15.

Put "True" in front of the correct statement and "False" in front of the incorrect statement: JSX is executed directly by browsers.

a)

True

b)

False

16.

Choose the correct answer: What is ReactJS primarily used for?

a)

Backend development

b)

Building user interfaces

c)

Database management

d)

Mobile app development

17.

Choose the correct answer: ReactJS is maintained by:

a)

Google

b)

Microsoft

c)

Facebook

d)

Amazon

18.

Choose the correct answer: Which feature makes ReactJS efficient for UI updates?

a)

Virtual DOM

b)

Global CSS

c)

Server-side rendering

d)

Inline styles

19.

Choose the correct answer: What syntax extension does React use for templating?

a)

HTML

b)

CSS-in-JS

c)

JSX

d)

TypeScript

20.

Choose the correct answer: React components are:

a)

Non-reusable

b)

Reusable

c)

Only for class components

d)

Limited to 10 per app

21.

Choose the correct answer: The Virtual DOM is a:

a)

Real DOM copy

b)

Browser plugin

c)

Lightweight in-memory representation

d)

State management tool

22.

Choose the correct answer: How does Virtual DOM improve performance?

a)

By updating the entire DOM

b)

By reducing component count

c)

By disabling CSS

d)

By minimizing direct DOM manipulations

23.

Choose the correct answer: What triggers a Virtual DOM update?

a)

State/props changes

b)

CSS changes

c)

User login

d)

API calls

24.

Choose the correct answer: To create a React app with Vite, run:

a)

npm create-react-app

b)

npm create vite@latest

c)

yarn add react

d)

npx install react

25.

Choose the correct answer: After creating a Vite project, you must run:

a)

npm run dev

b)

npm start

c)

npm build

d)

npm deploy

26.

Choose the correct answer: The default port for Vite is:

a)

3000

b)

5173

c)

8080

d)

8000

27.

Choose the correct answer: Vite supports frameworks like:

a)

Only React

b)

Angular only

c)

React, Vue, Svelte

d)

Django

28.

Choose the correct answer: JSX stands for:

a)

JavaScript XML

b)

Java Syntax Extension

c)

JSON XML

d)

JS Extensions

29.

Choose the correct answer: JSX allows embedding expressions with:

a)

Parentheses ()

b)

Angle brackets <>

c)

Square brackets []

d)

Curly braces {}

30.

Choose the correct answer: To render multiple JSX elements, wrap them in:

a)

b)

or <>

c)

d)

31.

Give significant term for question: The virtual representation of the actual DOM that React uses for efficient updates.

a)

Virtual DOM

b)

JSX

c)

props

d)

useState

32.

Give significant term for question: The syntax extension for JavaScript that allows writing HTML-like code in React.

a)

JSX

b)

Components

c)

state

d)

Vite

33.

Give significant term for question: The React method used to render components to the DOM in older React versions.

a)

ReactDOM.render()

b)

useState

c)

Class component

d)

Virtual DOM

34.

Give significant term for question: The modern build tool that's faster than Create React App for setting up React projects.

a)

Vite

b)

Components

c)

Functional component

d)

props

35.

Give significant term for question: The self-contained, reusable building blocks of a React application.

a)

Components

b)

Class component

c)

JSX

d)

ReactDOM.render()

36.

Give significant term for question: The type of component defined as a JavaScript function.

a)

Functional component

b)

Class component

c)

state

d)

useState

37.

Give significant term for question: The type of component that uses ES6 classes and extends React.Component.

a)

Class component

b)

Functional component

c)

Vite

d)

props

38.

Give significant term for question: The React object that holds mutable data specific to a component.

a)

state

b)

props

c)

Virtual DOM

d)

useState

39.

Give significant term for question: The immutable data passed from parent to child components.

a)

props

b)

state

c)

Components

d)

JSX

40.

Give significant term for question: The React Hook that manages state in functional components.

a)

useState

b)

ReactDOM.render()

c)

Virtual DOM

d)

Vite

41.

Match the correct answer from column A what suits column B. From column B, choose the entry that correctly matches: Virtual DOM

a)

Lightweight in-memory representation of the actual DOM

b)

Hook for side effects (e.g., data fetching)

42.

Match the correct answer from column A what suits column B. From column B, choose the entry that correctly matches: JSX

a)

HTML-like syntax extension for JavaScript

b)

Hook for accessing React context globally

43.

Match the correct answer from column A what suits column B. From column B, choose the entry that correctly matches: useState

a)

Hook for managing state in functional components

b)

Hook for complex state logic with reducers

44.

Match the correct answer from column A what suits column B. From column B, choose the entry that correctly matches: useEffect

a)

Hook for side effects (e.g., data fetching)

b)

Hook for accessing React context globally

45.

Dear learner: Complete the question. React.js is primarily used for creating user interfaces for (a)   applications.

46.

Match the correct answer from column A what suits column B: For the item , choose the correct description from column B.

a)

Hook to extract dynamic URL parameters

b)

Client-side navigation component

c)

Top-level component for client-side routing

d)

Placeholder for nested route content

47.

Match the correct answer from column A what suits column B: For the item , choose the correct description from column B.

a)

Client-side navigation component

b)

Container for definitions

c)

Maps a URL path to a component

d)

Top-level component for client-side routing

48.

Match the correct answer from column A what suits column B: For the item , choose the correct description from column B.

a)

Hook to extract dynamic URL parameters

b)

Maps a URL path to a component

c)

Placeholder for nested route content

d)

Client-side navigation component

49.

Match the correct answer from column A what suits column B: For the item , choose the correct description from column B.

a)

Client-side navigation component

b)

Container for definitions

c)

Placeholder for nested route content

d)

Hook to extract dynamic URL parameters

50.

Match the correct answer from column A what suits column B: For the item useParams(), choose the correct description from column B.

a)

Hook to extract dynamic URL parameters

b)

Maps a URL path to a component

c)

Client-side navigation component

d)

Top-level component for client-side routing

51.

Match the correct answer from column A what suits column B: For the item , choose the correct description from column B.

a)

Placeholder for nested route content

b)

Maps a URL path to a component

c)

Container for definitions

d)

Top-level component for client-side routing

52.

Dear learner: Give signific term question. Identify the term that fits the definition: A utility-first CSS framework for rapid UI development.

(a)  

53.

Dear learner: Give signific term question. Identify the term that fits the definition: The library that enables client-side navigation in React applications.

(a)  

54.

Dear learner: Give signific term question. Identify the term that fits the definition: The top-level component that syncs your app with the browser's URL.

(a)  

55.

Dear learner: Give signific term question. Identify the term that fits the definition: The component that defines the mapping between URLs and components.

(a)  

56.

Dear learner: Give signific term question. Identify the term that fits the definition: The container component that holds multiple Route definitions.

(a)  

57.

Dear learner: Give signific term question. Identify the term that fits the definition: The component used for navigation that prevents full page reloads.

(a)  

58.

Dear learner: Give signific term question. Identify the term that fits the definition: The special Link component that applies styling when active.

(a)  

59.

Dear learner: Give signific term question. Identify the term that fits the definition: The hook that extracts dynamic parameters from the URL.

(a)  

60.

Dear learner: Give signific term question. Identify the term that fits the definition: The hook used for programmatic navigation between routes.

(a)  

61.

Dear learner: Give signific term question. Identify the term that fits the definition: The special component that renders matched child routes in nested routing.

(a)  

62.

Dear learner: Complete the question. To install React Router, you use the package (a)   .

63.

Dear learner: Complete the question. The top-level component for routing in React is (a)   .

64.

Dear learner: Complete the question. Dynamic route parameters are accessed using the (a)   hook.

65.

Dear learner: Complete the question. For programmatic navigation, you use the (a)   hook.

66.

Dear learner: Complete the question. A 404 page is implemented using the route path (a)   .

67.

Dear learner: Complete the question. Nested routes render child components using the (a)   component.

68.

Dear learner: Complete the question. The (a)   hook is used for side effects like data fetching.

69.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: You can embed JavaScript expressions in JSX using curly braces {}.

a)

True

b)

False

70.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: JSX fragments are written as <>....

a)

True

b)

False

71.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: React components must always start with a capital letter.

a)

True

b)

False

72.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Functional components can't use state.

a)

True

b)

False

73.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Class components are the modern preferred way to write components.

a)

True

b)

False

74.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Components can return other components.

a)

True

b)

False

75.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Props are immutable within child components.

a)

True

b)

False

76.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: State can only be used in class components.

a)

True

b)

False

77.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: setState() is asynchronous in class components.

a)

True

b)

False

78.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Props can only pass string values.

a)

True

b)

False

79.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: State changes always trigger a re-render.

a)

True

b)

False

80.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: Hooks can only be used in functional components.

a)

True

b)

False

81.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: useState returns the current state and a setter function.

a)

True

b)

False

82.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: You can call hooks inside loops or conditionals.

a)

True

b)

False

83.

Dear learner: Put "True" in front of the correct statement and "False" in front of the incorrect statement: useEffect can return a cleanup function.

a)

True

b)

False

84.

Dear learner: Choose the correct answer: Class components require:

a)

extends React.Component

b)

useState()

c)

function keyword

d)

props keyword

85.

Dear learner: Choose the correct answer: Props are passed to child components as:

a)

Mutable objects

b)

Immutable values

c)

CSS classes

d)

State variables

86.

Dear learner: Choose the correct answer: To share state between components:

a)

Use global variables

b)

Copy-paste code

c)

Lift state up

d)

Avoid props

87.

Dear learner: Choose the correct answer: State is managed using:

a)

useState or useReducer

b)

useEffect

c)

useContext

d)

useRef

88.

Dear learner: Choose the correct answer: Props are used to:

a)

Modify parent state

b)

Pass data to children

c)

Replace Redux

d)

Style components

89.

Dear learner: Choose the correct answer: Prop drilling refers to:

a)

Passing props through multiple layers

b)

Using useEffect

c)

Styling components

d)

Server-side rendering

90.

Dear learner: Choose the correct answer: To avoid prop drilling, use:

a)

useState

b)

Class components

c)

Inline styles

d)

Context API or Redux

91.

Dear learner: Choose the correct answer: Rules of Hooks include:

a)

Call Hooks in loops

b)

Call Hooks at the top level

92.

Dear learner: Choose the correct answer: useReducer is used for:

a)

Simple state

b)

Styling

c)

Complex state logic

d)

Prop drilling

93.

Dear learner: Choose the correct answer: useContext helps with:

a)

Global state management

b)

Local state only

c)

API calls

d)

Inline CSS

94.

Dear learner: Choose the correct answer: useEffect replaces lifecycle methods like:

a)

componentDidMount

b)

render

c)

constructor

d)

shouldComponentUpdate

95.

Match the correct answer from column A what suits column B: For the item State, choose the correct description from column B.

a)

Handle side effects (e.g., API calls)

b)

Sharing state across components without prop drilling

c)

Mutable data local to a component

d)

Passing props through multiple layers (anti-pattern)

e)

Immutable data passed from parent to child

96.

Match the correct answer from column A what suits column B: For the item Props, choose the correct description from column B.

a)

Immutable data passed from parent to child

b)

Sharing state across components without prop drilling

c)

Managing complex state transitions

d)

Handle side effects (e.g., API calls)

97.

Match the correct answer from column A what suits column B: For the item useReducer, choose the correct description from column B.

a)

Handle side effects (e.g., API calls)

b)

Mutable data local to a component

c)

Managing complex state transitions

d)

Passing props through multiple layers (anti-pattern)

98.

Match the correct answer from column A what suits column B: For the item useContext, choose the correct description from column B.

a)

Sharing state across components without prop drilling

b)

Passing props through multiple layers (anti-pattern)

c)

Immutable data passed from parent to child

d)

Manage complex state transitions

99.

Match the correct answer from column A what suits column B: For the item useEffect, choose the correct description from column B.

a)

Handle side effects (e.g., API calls)

b)

Mutable data local to a component

c)

Sharing state across components without prop drilling

d)

Passing props through multiple layers (anti-pattern)

100.

Match the correct answer from column A what suits column B: For the item Prop Drilling, choose the correct description from column B.

a)

Passing props through multiple layers (anti-pattern)

b)

Mutable data local to a component

c)

Handle side effects (e.g., API calls)

d)

Immutable data passed from parent to child