Skip to content

Commit d404e02

Browse files
committed
Fix the definition of useAppDispatch
1 parent abb71b3 commit d404e02

File tree

2 files changed

+2
-2
lines changed
  • i18n
    • en/docusaurus-plugin-content-docs/current/guides/examples
    • ru/docusaurus-plugin-content-docs/current/guides/examples

2 files changed

+2
-2
lines changed

i18n/en/docusaurus-plugin-content-docs/current/guides/examples/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ declare type AppDispatch = typeof store.dispatch;
364364
```ts title="shared/store/index.ts"
365365
import { useDispatch, useSelector, type TypedUseSelectorHook } from "react-redux";
366366

367-
export const useAppDispatch = () => useDispatch<AppDispatch>();
367+
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
368368
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
369369
```
370370

i18n/ru/docusaurus-plugin-content-docs/current/guides/examples/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ declare type AppDispatch = typeof store.dispatch;
366366
```ts title="shared/store/index.ts"
367367
import { useDispatch, useSelector, type TypedUseSelectorHook } from "react-redux";
368368

369-
export const useAppDispatch = () => useDispatch<AppDispatch>();
369+
export const useAppDispatch = useDispatch.withTypes<AppDispatch>()
370370
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
371371
```
372372

0 commit comments

Comments
 (0)