Skip to content

Commit 677105c

Browse files
authored
Merge pull request #2486 from Dezzep/patch-4
Fix spelling, change reduser to reducer
2 parents 1b649e1 + c51cb12 commit 677105c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/6/en/part6d.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,13 @@ const App = () => {
442442
export default App
443443
```
444444

445-
The hook [useReducer](https://beta.reactjs.org/reference/react/useReducer) provides a mechanism to create a state for an application. The parameter for creating a state is the reduser function that handles state changes, and the initial value of the state:
445+
The hook [useReducer](https://beta.reactjs.org/reference/react/useReducer) provides a mechanism to create a state for an application. The parameter for creating a state is the reducer function that handles state changes, and the initial value of the state:
446446

447447
```js
448448
const [counter, counterDispatch] = useReducer(counterReducer, 0)
449449
```
450450

451-
The reduser function that handles state changes is similar to Redux's reducers, i.e. the function gets as parameters the current state and the action that changes the state. The function returns the new state updated based on the type and possible contents of the action:
451+
The reducer function that handles state changes is similar to Redux's reducers, i.e. the function gets as parameters the current state and the action that changes the state. The function returns the new state updated based on the type and possible contents of the action:
452452

453453
```js
454454
const counterReducer = (state, action) => {

0 commit comments

Comments
 (0)