DEV Community

Discussion on: A type-safe approach to Redux stores in TypeScript

Collapse
 
wintermute42 profile image
wintermute42

Hi, great guide :-)
I just seem to be missing some detail while struggling to adapt it to a use case of mine. Is there a repository with the complete code?

Collapse
 
raminahmadi1986 profile image
Ramin Ahmadi • Edited

Yeah, I'm looking for the complete code too, could you please provide it somewhere?
and I'm wondering why you suggest ConnectedReduxProps as it makes your code a bit ugly!
so instead of this.props.actionCreator, you have to say this.props.dispatch(call the action creator here).
by the way I got some errors relating that ConnectedReduxProps, for people struggling with this, you should change it to this:

IConnectedReduxProps

Collapse
 
resir014 profile image
Resi Respati

Hi Ramin and wintermute42,

This was originally made in a coding test for a job application (which I now have!) so the code isn't really public at the moment. When I have the time, I'll try to put what I have back together and put these out into the public for all to see!

Collapse
 
resir014 profile image
Resi Respati

Also, re: ConnectedReduxProps - I initially decided to do it this way because I didn't know how to properly type mapDispatchToProps calls, but now that I know how, expect for some updates to this pattern in the near future. :-)