wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

REACT-JS

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is React in the context of web development?

a)

CSS Framework

b)

JavaScript Library

c)

JavaScript Framework

d)

Frontend Tool

2.

What is the main goal of React?

a)

Developing User Interfaces

b)

Creating Mobile Applications

c)

Managing Databases

d)

Building Backend Services

3.

Arjun is setting up a React environment and is confused about which tool to use. Which tool can be used to set up a React environment?

a)

Angular CLI

b)

Vite

c)

Vue CLI

d)

Webpack

4.

What is the first step to start a new project using Vite?

a)

Run The Development Server Using npm run dev.

b)

Install The Dependencies

c)

Choose The Template

d)

Open Your Terminal & Run the following command – npm create vite@latest

5.

What is the main advantage of using React in a web development project?

a)

Efficient DOM manipulation

b)

Server-side rendering

c)

Database management

d)

Backend development

6.

Which feature of React allows for code reusability in a project?

a)

Components

b)

State management

c)

Routing

d)

Styling

7.

What is the virtual DOM in React?

a)

A lightweight version of the actual DOM

b)

A separate database for storing DOM elements

c)

A tool for debugging React components

d)

A feature for server-side rendering

8.

What is the purpose of JSX in React?

a)

To write HTML elements in JavaScript

b)

To style React components

c)

To manage state in React

d)

To create server-side scripts

9.

Explain the concept of state in React components.

a)

State is used for storing data that can change over time

b)

State is used for defining the structure of components

c)

State is used for handling routing in React applications

d)

State is used for server-side rendering of components

10.

How to style react components?

a)

CSS Modules

b)

Component Libraries

c)

Styled Components

d)

None of these

11.

What is the significance of props in React components?

a)

Props are used for passing data from parent to child components

b)

Props are used for styling components

c)

Props are used for managing state in components

d)

Props are used for server-side rendering

12.

What is the purpose of using keys in React lists?

a)

To uniquely identify list items and improve performance

b)

To apply different styles to list items

c)

To manage state within list components

d)

To create nested lists efficiently

13.

What is the main difference between state and props in React?

a)

State is mutable and controlled by the component itself, while props are immutable and passed down from parent components

b)

State is immutable and passed down from parent components, while props are mutable and controlled by the component itself

c)

State is used for styling components, while props are used for managing state

d)

State is used for server-side rendering, while props are used for client-side rendering

14.

Explain the concept of props drilling in React.

a)

Passing props from parent to child components multiple levels deep

b)

Passing props from child to parent components

c)

Passing props between sibling components

d)

Passing props to stateful components

15.

Guess The Output: What is value of y?
let y = [1, 2, 3].map(x => x ** 2);

a)

[1, 4, 9]

b)

[2, 4, 6]

c)

[1, 2, 3]

d)

[undefined, undefined, undefined]