piotrwitek / react-redux-typescript-guide

The complete guide to static typing in "React & Redux" apps using TypeScript
https://piotrwitek.github.io/react-redux-typescript-guide/
MIT License
13.35k stars 1.09k forks source link

Add useSelector and useDispatch example #207

Closed ivankoleda closed 2 years ago

ivankoleda commented 4 years ago

Description

This PR adds an example of usage useSelector and useDispatch. Mostly based on react-redux docs https://react-redux.js.org/using-react-redux/static-typing.

Hesitated about adding this types hooks in hooks folder, but there are examples of usage of react only hooks, so I added them into connected folder.

Related issues:

Checklist

piotrwitek commented 4 years ago

Looks good, just need to improve file organization. Thanks!

piotrwitek commented 2 years ago

Looks good