DEV Community

Discussion on: Code Review

Collapse
 
pantbinod001 profile image
Binod Pant

Hi Chris,

Thank you for review my code and give me feedback. In the case of mapDispatchToProps I have used a typescript so I apply a strict type checking.

I had tried this const mapDispatchToProps = {
getAllMovie,
getSingleMovieDetail
} This also works.

Collapse
 
naismith profile image
Chris Naismith

I also use Typescript at work and use this method for mapDispatchToProps. Currently I'm using the @redux/toolkit which exports ActionCreatorWithPayload which is helpful for just reducing complexity. Best of luck.

Thread Thread
 
pantbinod001 profile image
Binod Pant

Thank you, Your suggestion reduces complexity. for the next project, I will apply @redux/toolkit. Once again thank you.