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).
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.
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.