-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new npm release #299
Comments
Second this, mainly the changes to the types definitions would have helped me a lot. |
@tony-scio Do you want to cut npm releases? I'm happy to add as an owner. |
FWIW, the last time Tim and I chatted about this, he was concerned that the current types may not be sufficiently correct or something along those lines. Tim, can you clarify what those concerns are atm? |
Yes, I'm primarily concerned that we're using a number of overloads to apply the thunk types, rather than preferring the middleware approach. This means that the Dispatch and bindActionCreators types get overridden if the module is included, even if it's not used. This also creates a problem for using multiple middlewares on the same store, where they may get clobbered by this overload. I'm not sure of the priority order on overloads vs. directly applied types, but that uncertainty makes me wary. For reference, here are the PRs with type changes since 2.3.0: #216 I have some regret about merging in #224 and #278, since they add the overloads. They also tie to the specific types we have in Redux 4.x, and will break under 5.0. |
@gaearon I'm probably not yet well qualified to be responsible for redux-thunk releases as I haven't developed in this library. I'm just a consumer of the library who is still very much looking forward to the next release. |
I'm also looking forward the next release。My company has standard for picking third part library,Now for 2 years no new release, I may be forced to pick alternative library, but I don't know any other library. |
Just keep in mind the only thing that has changed in that time is the build system and the TypeScript types. The code of the actual middleware hasn't changed in 4 years, and that was only to add extraArgument. |
@timdorr apologies for the naive question, but why not make a release branch and, on it, back out the 2 commits you mentioned that you regret? One of the other type improvements would have saved me a prod bug. Seems unfortunate to hold them back from users. |
Just chiming in to say that I've put lots of hours over the years into trying to type thunks in both Flow types and TypeScript, so having some kind of type-safe solution that is type-correct for connected components, even if not ergonomic would be a huge windfall. I'm more concerned about catching bugs, rather than having an ergonomic API. This typing doesn't appear to be a solved problem with any kind of official recommendation, even if it's a "this is not great, but it works". That said, thanks for the maintenance work, I find redux-thunk essential for the apps I maintain. |
Hey, any plans on releasing the fixes? |
Fair. microsoft/TypeScript#14107 is annoying, I contributed a workaround here, but the root problem (the overloads) remains. Elsewhere they recommend:
Still, as it's been three years, I'm in favor of a release or some move in some direction. I currently use the latest release |
As mentioned in that other thread, using our official Redux Toolkit package (which integrates thunks into |
Here's how to reproduce the problem with Redux Toolkit (and applying the aforementioned workaround fixes it here too):
Basically the |
Is there any news on this? As per my previous post, RTK doesn't solve the problem, but the |
UpdateThe primary concern here was that the use of global overloads of the After some discussion, we've come up with an alternate approach: we've split the override types out into a standalone file that can be imported separately if desired. That way, the default behavior reflects only what is true about a basic Redux store, and if you want to globally override the types in your app, you can do See #321 for the changes. Beyond that, the other unpublished changes are:
I would publish a new alpha right now, but I don't actually have NPM publish rights for the |
I'm still waiting to get publish rights for the NPM package, but I've just gotten CodeSandbox CI integrated into the repo and generated a test build over in #324 . If anyone wants to override their installed versions and try this out, you can use the CodeSandbox CI builds:
Would appreciate some feedback on whether this really does fix any outstanding TS issues for folks! |
We're gearing up to do one soon, so I'm going to close this out. |
Yep. Tim gave me publish rights and did some cleanup. I will probably have 2.4 live tonight or tomorrow. |
and 2.4.0 is now live! |
Thank you! 2.4.0 works for me even without the suggested |
Feature Request
There are a lot of good updates since the last npm release over 2 years ago. v2.3.0...master
It'd be really great if whoever has access could cut a new release.
The text was updated successfully, but these errors were encountered: