DEV Community

Discussion on: Explain Redux like I'm five

Collapse
 
dcsan profile image
dc

Agreed!

action creators with state objects do help time travel debug but they prevent proper typechecking, to get around JS problems. if using typescript they get in the way.

I also prefer event emitter because the pub/sub API is so much clearer.
but redux connect() does automate some processes you'd have to setup yourself otherwise
and mapStateToProps to filter which events you want to sub to.

All this could be done with a much simpler event emitter module though.
Usually when i adopt redux I'll wrap in my own TS code to hide the boilerplate in a single place.