Currently, I am utilizing Redux-Toolkit and Typescript. Specifically, my goal is to implement ConnectedProps as recommended in the redux documentation. However, it appears that the dispatch type is not recognized correctly (it is identified as a normal Dispatch instead of a ThunkDispatch).
Any advice on how to address this issue? Currently, I have been:
(1) Using a custom 'useThunkDispatch' hook. Although effective, this approach adds an extra line of code and import that I would prefer to avoid.
(2) Opting for the function version of 'mapDispatch', explicitly defining my dispatch as a ThunkDispatch (or AppDispatch as described in the redux toolkit documentation
Explore the Code Sandbox: https://codesandbox.io/s/connectedprops-typing-for-thunk-uyplw