shaogen1995 aabf88d0a1 up il y a 2 ans
..
public f0e7e96e65 upp il y a 2 ans
src aabf88d0a1 up il y a 2 ans
.gitignore 0592065624 'init' il y a 2 ans
README.md aabf88d0a1 up il y a 2 ans
config-overrides.js 0592065624 'init' il y a 2 ans
package-lock.json aabf88d0a1 up il y a 2 ans
package.json aabf88d0a1 up il y a 2 ans
path.tsconfig.json 0592065624 'init' il y a 2 ans
tsconfig.json 0592065624 'init' il y a 2 ans

README.md

------ts版本类型问题-------

找到 import { useDispatch } from "react-redux";

按住 Ctrl 点击 useDispatch 出来 useDispatch.d.ts类型声明文件 (路径node_modules>react-redux>es>hooks>useDispatch.d.ts)

找到最后面的 AnyAction,按住 Ctrl 点击 进入 (路径node_modules>redux>index.d.ts)

找到 export interface Action { type: T }

在type后面加一个 ? 即=>

export interface Action { type?: T }