Redux TS Generic type 'Dispatch' requires 1 type argument(s)

前端 未结 2 732
不思量自难忘°
不思量自难忘° 2020-12-21 04:54

Trying to setup a project with typescript and redux. I am getting this error

Generic type \'Dispatch\' requires 1 type argument(s).
<
2条回答
  •  忘掉有多难
    2020-12-21 05:03

    I solved this by downgrading to Redux 3.7. It has proper typings (There still aren't typings for Redux 4.0). There are some Github issues where they discuss about it (here and here).

提交回复
热议问题