We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db7ecd3 commit 3fd0186Copy full SHA for 3fd0186
src/content/blog/2024/04/25/react-19-upgrade-guide.md
@@ -715,14 +715,13 @@ type Example = ReactElement["props"];
715
- useReducer<React.Reducer<State, Action>>(reducer)
716
+ useReducer<State, [Action]>(reducer)
717
```
718
-
719
reducer를 인라인으로 정의한다면 함수 매개변수에 타입을 지정하는 방식을 권장합니다.
720
```diff
721
- useReducer<React.Reducer<State, Action>>((state, action) => state)
722
+ useReducer((state: State, action: Action) => state)
723
724
725
이는 `useReducer` 호출문 밖으로 reducer를 분리할 때도 동일하게 적용됩니다.
+
726
```ts
727
const reducer = (state: State, action: Action) => state;
728
0 commit comments