redux-batched-actions icon indicating copy to clipboard operation
redux-batched-actions copied to clipboard

work with Redux >= 5.0.0

Open ericblade opened this issue 1 year ago • 2 comments

  • fixes all batchAction calls emitting TS errors about BatchAction not being compatible with UnknownAction
  • break compatibility with Redux < 5.0.0, therefore including a major version bump
  • update all dependencies to latest, except for [email protected], as sinon-chai needs an update to install correctly with chai@5
  • remove unnecessary dev dependencies that can be run via npx
  • test, clean, copy:ts, build:mjs, build commands all updated to work cross-platform using npx shx and npx cross-env
  • all tests run complete

ericblade avatar Dec 29 '23 08:12 ericblade

@ericblade Can you paste some of the TS errors you are seeing from Redux?

tshelburne avatar Jan 02 '24 13:01 tshelburne

hmm.. be a bit before i can hop back in and undo my changes, but the basics is once upgrading to redux 5 and rtk 2 due to the change from AnyAction to UnknownAction, BatchAction is not compatible with the new UnknownAction. Switching it to use UnknownAction instead of Action seems to make it all work and keeps typing apparently working, as far as I can see.

I'll leave this up so next time I sit down at this PC I'll remember to go post the complete error. Can repro just by upgrading to redux 5 in any existing code

ericblade avatar Jan 02 '24 17:01 ericblade