Font size
WorksheetsReact Redux
Total questions: 20
Worksheet time: 3mins
Which of the following is not part of redux?
Action
Reducer
View
State
Which is used to keep the value of components unique?
storage
Data
Key
Ref
To achieve dynamic UI updates. Which of the following need to be updated?
state
render
Props
renderComponent
The ideal form of a reducer is...
Pure javascript function
Functional component React
Class component React
How do you understand Redux?
Redux consists of 3 main components: Actions, Reducers, Store
Redux is a Javascript library
Can change state directly from store
Force all states to be put in the store
What is an action?
a function
a String
An object
a type
What is the Global State?
an array of objects
an object
A list
What is React?
A programming language used for web development
A javascript library for building user interfaces
A framework for creating mobile applications
A database management system
Which of the following is a way to handle data in React.js?
What is the purpose of React Router DOM?
It helps in creating user interfaces.
It is used for routing in React applications
It is used for data fetching in React applications.
It is used for managing state in React applications.
What is the correct implementation of a Route using React Router DOM?
<Route path="/" element={<Home />} />
<Route path="/" component={<Home />} />
<Route path="/" render={<Home />} />
<Route path="/" element={Home} />
What is the best way to navigate to a new route using React Router?
By manually updating the URL in the address bar.
By using the <Link> component to create a clickable link to the new route.
By using the history object to push a new route.
By using the <Redirect> component to redirect to the new route.
What is the purpose of useContext hook in React?
To use React's context API to pass data between components
To use React's Redux API to manage state in an application
To use React's Router API to handle navigation in an application
To use React's lifecycle methods in functional components
Which hook is used in conjunction with the Provider pattern in React-Redux?
useState
useContext
useSelector
useReducer
What is the Redux store responsible for?
Storing all React components
Storing the initial state of the application
Holding the complete state tree of the application
Executing all the reducers of the application
Redux offer a solution of storing all your application state in one place called a "____________"
Storage
Save
Store
Bank
What is the Provider pattern in react-redux used for?
To provide a way to pass props to components
To allow components to get direct access to the redux store without having to prop drill it
To manage local component state
To connect to external APIs
What does the useSelector() hook allow you to do?
To change the state in the Redux store
To dispatch actions to the Redux store
To extract data from the Redux store's state and subscribe to updates
To create a new Redux store
What does the useDispatch() hook return in Redux?
A) A new state object
B) A reference to the store's dispatch method
C) An action creator function
D) The current state value
A parent component could access or read its child components attribute
True
False
