Open
Conversation
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
00b38de to
37962ac
Compare
6e1e2b8 to
05b1df0
Compare
05b1df0 to
72fd7a5
Compare
72fd7a5 to
35fd1f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.0→2.4.2Release Notes
reduxjs/redux-thunk (redux-thunk)
v2.4.2Compare Source
This release removes an unused TS type that caused errors when users were type-checking libraries in
node_modules.What's Changed
Full Changelog: reduxjs/redux-thunk@v2.4.1...v2.4.2
v2.4.1Compare Source
This release adds an explicit plain
actionoverload to theThunkDispatchTS type to better handle inference of the return value in some cases.What's Changed
Full Changelog: reduxjs/redux-thunk@v2.4.0...v2.4.1
v2.4.0Compare Source
This very overdue release makes several major improvements to the TypeScript types, and converts the actual source to TypeScript. Sorry for the delay!
Changelog
TypeScript Improvements
This release fixes several outstanding issues that had been reported with the types. An extra overload has been added to let TS correctly understand some generically-typed values being passed to
dispatch, and the overloads have been reworked for additional compatibility.There's also a new
ThunkActionDispatchtype that can be used to represent howbindActionCreatorsturns bound thunks into(arg) => thunkReturnValue.Additionally, all of the generic args have been giving meaningful names instead of one-letter abbreviations (
S->State,E->ExtraArgument, etc), and we've added descriptive comments in the type definitions for clarity.Optional Global
DispatchType ExtensionMost Redux apps have the thunk middleware enabled, but the default
DispatchandbindActionCreatortypes only know about the standard behavior of a basic Redux store without any middleware. The thunk middleware types add to that type behavior, so thatDispatchknows dispatching a thunk can actually return a value such as a Promise.We generally recommend inferring the type of
dispatchand using that to create reusable types, including creating pre-typed hooks. However, some users may prefer to globally augment theDispatchtype to always use the additional thunk behavior.You can now
import 'redux-thunk/extend-redux'to globally augment theDispatchtype as an opt-in change in behavior.Codebase Converted to TypeScript
We've gone ahead and converted the actual source to TS. Since the source was only 15-ish lines to begin with, most of the "conversion" time was just trying to convince TS that assigning
thunk.extraArgument = createThunkMiddlewarewas a legal operation :)We also updated the build tooling:
Finally, the README has been updated with newer instructions and usage information.
What's Changed
applyMiddlewareby @iamandrewluca in #279|by @Philipp91 in #317New Contributors
Full Changelog: reduxjs/redux-thunk@v2.3.0...v2.4.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.