You're using explicit type-casting for thunks in connect function (which is not bad per se, it just feels like a hacky workaround to me).
connect
@types/react-redux@6.0.11 actually includes higher-order-type similar to your CutMiddleFunction and provides a higher-order-type ResolveThunks that servers a purpose similar to your unboxThunk.
@types/react-redux@6.0.11
unboxThunk
Thanks. I will watch new built-in types.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You're using explicit type-casting for thunks in
connect
function (which is not bad per se, it just feels like a hacky workaround to me).@types/react-redux@6.0.11
actually includes higher-order-type similar to your CutMiddleFunction and provides a higher-order-type ResolveThunks that servers a purpose similar to yourunboxThunk
.Thanks. I will watch new built-in types.