is there any contract stating that dispatch has to...
# redux
n
is there any contract stating that dispatch has to return the transformed state ? because to me the
redux.Store
api looks like it could return anything
p
No, type returned is not guaranteed. The Store will return the new state, however middleware can wrap the dispatch function and return anything. Reduxkotlin uses Any as return value to allow this. There are JS middleware and store enhancers that return types other than the state
n
great.. but if i do not mess up the types declared when i create a wrapper it should all still work.. or i just declare the return type as Any always