wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

React Redux

Total questions: 20

Worksheet time: 3mins

Name
Class
Date
1.

Which of the following is not part of redux?

a)

Action

b)

Reducer

c)

View

d)

State

2.

Which is used to keep the value of components unique?

a)

storage

b)

Data

c)

Key

d)

Ref

3.

To achieve dynamic UI updates. Which of the following need to be updated?

a)

state

b)

render

c)

Props

d)

renderComponent

4.

The ideal form of a reducer is...

a)

Pure javascript function

b)

Functional component React

c)

Class component React

5.

How do you understand Redux?

a)

Redux consists of 3 main components: Actions, Reducers, Store

b)

Redux is a Javascript library

c)

Can change state directly from store

d)

Force all states to be put in the store

6.

What is an action?

a)

a function

b)

a String

c)

An object

d)

a type

7.

What is the Global State?

a)

an array of objects

b)

an object

c)

A list

8.

What is React?

a)

A programming language used for web development

b)

A javascript library for building user interfaces

c)

A framework for creating mobile applications

d)

A database management system

9.

Which of the following is a way to handle data in React.js?

a)
State & Props
b)
Services & Components
c)
State & CSS
d)
State & Services
10.

What is the purpose of React Router DOM?

a)

It helps in creating user interfaces.

b)

It is used for routing in React applications

c)

It is used for data fetching in React applications.

d)

It is used for managing state in React applications.

11.

What is the correct implementation of a Route using React Router DOM?

a)

<Route path="/" element={<Home />} />

b)

<Route path="/" component={<Home />} />

c)

<Route path="/" render={<Home />} />

d)

<Route path="/" element={Home} />

12.

What is the best way to navigate to a new route using React Router?

a)

By manually updating the URL in the address bar.

b)

 By using the <Link> component to create a clickable link to the new route.

c)

By using the history object to push a new route.

d)

By using the <Redirect> component to redirect to the new route.

13.

What is the purpose of useContext hook in React?

a)

To use React's context API to pass data between components

b)

To use React's Redux API to manage state in an application

c)

To use React's Router API to handle navigation in an application

d)

To use React's lifecycle methods in functional components

14.

Which hook is used in conjunction with the Provider pattern in React-Redux?

a)

useState

b)

useContext

c)

useSelector

d)

useReducer

15.

What is the Redux store responsible for?

a)

Storing all React components

b)

Storing the initial state of the application

c)

Holding the complete state tree of the application

d)

Executing all the reducers of the application

16.

Redux offer a solution of storing all your application state in one place called a "____________"

a)

Storage

b)

Save

c)

Store

d)

Bank

17.

What is the Provider pattern in react-redux used for?

a)

To provide a way to pass props to components

b)

To allow components to get direct access to the redux store without having to prop drill it

c)

To manage local component state

d)

To connect to external APIs

18.

What does the useSelector() hook allow you to do?

a)

To change the state in the Redux store

b)

To dispatch actions to the Redux store

c)

To extract data from the Redux store's state and subscribe to updates

d)

To create a new Redux store

19.

What does the useDispatch() hook return in Redux?

a)

A) A new state object

b)

B) A reference to the store's dispatch method

c)

C) An action creator function

d)

D) The current state value

20.

A parent component could access or read its child components attribute

a)

True

b)

False