Skip to content

Commit e85e811

Browse files
committed
interviw questions day 1
1 parent bd3a4cd commit e85e811

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

React Projects/react interview/day 1.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,36 @@ If the field is empty, the form submission will be prevented, and the browser wi
114114

115115
20. The <figcaption> tag is a useful HTML element for adding captions to images, videos, and other media elements.
116116

117+
21. Redux is a predictable state container for JavaScript applications,
118+
commonly used with React. It helps manage the state of an application in a way that makes
119+
it easier to maintain, debug, and scale. Redux centralizes the application's state and logic,
120+
allowing for more predictable behavior and easier debugging of applications.
121+
122+
Key Concepts of Redux:
123+
1.Store:
124+
125+
The store is the central place where the entire state of your application is stored.
126+
It holds the current state and provides methods to access, update, and subscribe to changes in the state.
127+
There is only one store for the entire application, and the state is stored in a single JavaScript object.
128+
129+
130+
2.Actions:
131+
132+
Actions are plain JavaScript objects that describe what happened in the application.
133+
They must have a type property that describes the action, and they can optionally carry additional data (payload).
134+
135+
136+
3. Reducers:
137+
138+
Reducers are pure functions that specify how the application's state should change in response to an action.
139+
They take the current state and an action as arguments and return a new state.
140+
141+
142+
4.Dispatch:
143+
144+
The dispatch function is used to send actions to the store. When an action is dispatched,
145+
it triggers the reducer to update the state accordingly.
146+
147+
5. Selectors:
148+
149+
Selectors are functions that allow you to extract specific pieces of data from the state.

0 commit comments

Comments
 (0)