wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lecture 07 (reacts)

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is React?

a)

A database system

b)

A JavaScript library for building user interfaces

c)

A programming language

d)

A backend framework

2.

What is a key feature of React?

a)

Direct DOM manipulation

b)

SQL integration

c)

Virtual DOM

d)

File storage system

3.

What does the Virtual DOM do?

a)

Deletes HTML elements

b)

Updates the whole DOM every time

c)

Updates only the changed parts of the DOM

d)

Stores data permanently

4.

React components can be described as:

a)

Only HTML elements

b)

Database tables

c)

CSS styles

d)

Reusable building blocks for UI

5.

What are the inputs to a React component?

a)

HTML and CSS

b)

Props and State

c)

Functions only

d)

Variables only

6.

What is the difference between state and props?

a)

Props can be changed, state cannot

b)

State is read-only, props are editable

c)

Props are read-only, state can change

d)

No difference

7.

Which method is used to update state in a React class component?

a)

this.updateState()

b)

this.changeState()

c)

this.setState()

d)

this.modifyState()

8.

In ES6, which keyword has block scope?

a)

var

b)

class

c)

function

d)

let

9.

What is an arrow function in ES6?

a)

A way to create arrays

b)

A shorter syntax for writing functions

c)

A method for styling components

d)

A database query

10.

What is the purpose of props in React?

a)

To store internal component data

b)

To pass data from one component to another

c)

To update the DOM directly

d)

To style components