reduxjs/redux

Simplify the `useAppDispatch` definition

patel-himanshu opened this issue · 2 comments

What docs page needs to be fixed?

What is the problem?

The current definition of useAppDispatch can be shortened. Currently, it is:

export const useAppDispatch = () => useDispatch<AppDispatch>();

What should be changed to fix the problem?

It can be reduced to

export const useAppDispatch: () => AppDispatch = useDispatch;

Hah, I think #4372 beat this one, and also has a PR :)

But, we have the same "TS Quick Start" page over in the React-Redux and Redux Toolkit repos. Can you update those?

Yeah, sure.