-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Mark createStore
as deprecated
#4325
Comments
Just a first wording suggestion:
|
Hmm, I don't really think this is a good idea for the core library. It's not truly deprecated; we're not getting rid of the API. This is giving the false impression this API is going away. Also, I don't really think it's our job to tell users how to use the library. If they want to do dumb, bad, illogical things with it, that's up to them. As long as we're pointing them in the better direction of RTK everywhere else, that's what we should focus on. |
The problem is that this is essentially the last resort how we can "contact" users that either never revisited the documentation or are following outdated tutorials. Honestly, I'm less concerned about users that never revisited the documentation: it's on them. But I deeply care for users that are learning from an outdated tutorial - or from e.g. a bootcamp where the teacher is still teaching vanilla Redux because they never revisited the documentation. (And there is even a bunch of teachers who should know better and still teach wrong stuff because they don't want to rework their course as long as it brings in money - and those courses keep getting good ratings because the users themselves don't know better. It doesn't help that one of those courses is the highest-rated "Redux" course on udemy) They are not "at fault" here, but are being steered in a very wrong direction and will be deeply hurt as a result. And there is no other way to contact them than a "strikethrough" in the editor at this point. We will not be able to reach these users by an extra bright-red warning on the homepage or 10 new points in the style guide. I would be very fine to add another non-deprecated |
Is it really a problem that people are using Redux directly without RTK? People do dumb stuff with other libraries. Heck, I do dumb stuff with other libraries all the time. It's not really up to the library to judge how I use it. This is also an issue that naturally ages out over time. As those outdated tutorials get more and more outdated, they get seen less and less. There are plenty of old React tutorials still suggesting At the very least, I'm against this because it hijacks the usage of |
I spend time in Discord every single day. I see people struggling hours and days to wrap their head around concepts they don't need and having actual frustration of pain they would not have to have. In the last two years I have observed hundreds on Discord, another few hundred on Twitter and yet another few hundred on StackOverflow. And those are only the places I am looking. Those are the places where knowledge of Redux Toolkit already has spread and yet, still people are going a painful way. Not because they have a way of choosing, but because they do not know better. One of too many examples: People not only buy into this shit, they also fall victim to the sunken cost fallacy. They already have put money and lots of time into this course, so they will keep following what they learned there. At that point I can tell them that I am a Redux maintainer and that they learn outdated stuff and a good chunk of these people goes on for days, weeks and even multiple months until they come around to try RTK. (And then almost nobody goes back. I think I've seen three people go back so far to vanilla Redux, out of all those hundreds.) I have spent the last few years telling every single person that they are learning from outdated sources. I spend at least half an hour each day (realistically: probably more around two hours) going through twitter, StackOverflow and Discord telling people. Thinking that this "naturally ages out over time" at this point is naive. I have tried. Mark does too. We can do more to change that. Adding a deprecation warning is the least we can do. Also, I do not agree that we are hijacking the intended But newbies would at least get an indicator that they are wasting their time. |
I'm inclined to agree with Lenz here. This doesn't prevent anyone from using But we really don't want people using it directly today. This would at least give a visual indication to users in their editors that we encourage use of RTK instead. And frankly, as far as I can tell a majority of learners are coming into Redux without seeing that RTK exists, even today. Ideally, users would:
|
Hi, I'm chiming in because why not. I've used redux since 2016, I saw Mark posting about rtk last year or something and I've opted to not read it beyond the homepage cause it didn't interest me. I don't consider myself a newbie or a complete dumbass I hope. But that doesn't mean using Yes redux has initial boilerplate cost and maybe it's complicated for new Devs but please, deprecation as a means to encourage rtk is not the correct move, that's not real deprecation unless you really plan to remove Honestly it makes me sad how opinionated the JS ecosystem has become. |
If this is about the word "deprecation", we can happily also just add a runtime console warning that is visible in dev on every app start and can be disabled by setting Or we deprecate it with intent of future removal and add a Let's be real: Every other way of telling the users will be more disruptive than a strikethrough in the editor. @Brianzchen I hope you don't take it personal, but you have just now given a prime example why that warning should be there:
Also, those subscribed to this issue might have noticed that there was one more comment here that was deleted by the author again. The author expressed anger because now Redux would become "all about React". Clearly the messaging that the RTK core has nothing to do with React and should be used by everyone independently of Framework did not get through there in the past three years. Taking a step back, frankly Redux is probably one of the only libraries I can think of that did not introduce a breaking change to make life for their users easier because an old core api was replaced with a newer, more user-friendly one. Thinking about libraries I am using in the ecosystem:
Those are just what comes to mind. Maintaining a library is also about finding better ways for our users to use it. About giving them better ergonomics. This is nothing to be fearful of. Yes, the old stuff still works. That doesn't mean there isn't a better way of doing it and maybe we should help our users to find the right tools instead of going "yeah there are docs here, if they don't read them it's their own fault". |
I really like that you authors care about the users, and I share the same sentiment. There's also the fact that if people still rely on old documentation or don't care about updating themselves, it means that they don't care about the software they intend to use, or to be more specific, they care only about the software they intend to use to begin with, and redux might not be among them. Software changes and it's harsh, sometimes. If the change brings positive outcome in the long run, so be it. I think this is a good move and you should go ahead. RTK is more newbie friendly and lowers the barrier to adopt redux. It could be called "archived" if deprecated is not the right wording. Or a warning might work too. |
The way I understand it is that you want to deprecate entry point to the library? So you want to deprecate the library itself? What will RTK use, if createStore is deprecated? Some internal stuff? What should other "toolkit" libraries use? What if I don't want to use RTK? I looked at it long and hard and decided I don't want to use it for multiple reasons. I don't think I'm the only one in the entire world. If your concern is for newbies, then update documentation. Maybe add message to install log. |
@zdhr have you read the suggested deprecation message above?
Using
That has obviously no effect. Best example is your comment itself: We have done so for years and it seems you didn't notice, or you would not suggest this.
That will not be noticed by anyone. |
The fact that you're considering this approach gives me faith in the library as a whole going forward. Using I'm sure you'll do this too - but I'd recommend adding a long-form section to the docs with why this approach was taken and link it from the comment. |
Yep. That's exactly the idea here. As seen in this thread and the responses to my tweet about this, there are definitely plenty of people who are still using vanilla/legacy Redux in existing apps today. We are not going to break anyone's code, even if/when we release a new But... We explicitly do not want any new learners adopting those practices today. And unfortunately, many learners never even think to look at our docs. Given the prevalence of all these horribly outdated courses and tutorials even today, adding a |
For the record, we did previously discuss the idea of moving the existing APIs into a #3321: Discussion: Consider expanding the Redux core I'd really still prefer to not go that direction today. We already did one big package rename from Adding a single visible indicator to one API method is the lightest action we can take without requiring prohibitive amounts of effort on the part of either maintainers or users. |
I'm not sure if this is a useful comment, I clicked around the first tutorial presented in the docs, and the first example I landed on was using |
I am maintaining an alternative Redux utility library called redux-preboiled. I am sure there are other several alternatives to Redux Toolkit that do not have their any To me, a deprecation of It would be more honest to simply roll Redux Toolkit into Redux and require them to be used as a whole. A pseudo-deprecation, on the other hand, feels to me like keeping up only the faintest illusion of a choice of utilities on top of core Redux, while in fact discouraging everything but Redux Toolkit so heavily that the choice might as well not exist. |
@denisw tbh that is the point. We want people using RTK, and for very good technical reasons (avoiding common bugs, etc). I do respect that power users like yourself have built your own approaches on top of the Redux core, and we don't want to take away your ability to do that. That's why I keep pointing out that we're not going to break anyone's existing code. But to be frank: while the explosion of early interest in Redux resulted in a giant ecosystem of addons, it's become extremely clear that what today's new Redux learners benefit from most is a single standard approach to learn and use. Having dozens of libs for generating action creators, and other similar behavior, is confusing rather than helpful. As maintainers of both the Redux core and RTK, and the people who spend countless hours on a daily basis answering questions from people who are learning Redux, we see the problems that both learners and "typical dev" users run into all the time. RTK was designed to solve those problems... and it's succeeded. So yes, from our perspective, we are trying to "eliminate the choice" in a sense, because we're trying to guide our users into a path that solves their problems before they even know those problems exist. This is a delicate balance to strike here, and we're trying to take all potential use cases and constituencies into account. But in the end, we have to take the steps that we feel will result in the best possible experience for the largest possible portion of our userbase. |
@denisw don't you think that people might actually be reading the deprecation note? This whole discussion is so much hate around that one little tag, not around the text after. Besides that: even Redux-Preboiled seems like it would massively benefit from using |
I'm not "hating", I just find it important to point out that this is a misuse of the concept of deprecation. And while I'm sure many will read the note, it will still look like a problem to use I guess the deprecation will fulfill the purpose of making users aware of Redux Toolkit, and I understand that this is important to guide newcomers in the right direction. But to those that do not Redux Toolkit on purpose, this may have leave a bad taste. It may even feel like a "dark pattern" to push Redux Toolkit on them. To be clear, it's not a lack of choice that I find problematic. I would be happy to see Redux Toolkit's features being rolled into Redux, even though this would make Preboiled effectively obsolete (RTK is quite similar and more full-featured anyway). What I think annoys me is the pretense of choice combined with questionable nudges like this one; this is what I meant with it not feeling honest. |
@denisw : as I mentioned above, we've had a couple prior discussions around the idea of shuffling the packages around, but those would both require a ton of effort and be more confusing to end users.
That's... still the point :) From our perspective it is a problem. (And so is the pattern of writing a bunch of Redux action creators/action types/reducers/logic by hand.) It's much like React's deprecated lifecycles. So for
Frankly, this is a sort of no-win scenario for us:
I understand the complaints being raised in this thread and on Twitter, but at the same time I'm kinda confused at why you and a few others are saying that this feels like a "questionable nudge" or "crying wolf". Is it because we're talking about labeling |
@denisw that's why I already suggested a potential second export with a different name, without the deprecation note. In the end, this change will end up as
So for users who want to keep the current behaviour without a warning, it's a single code change. For a lot of other users, potentially eye-opening. Mark already quoted the Wikipedia page on "deprecation" on Twitter, but I'm going to do it again here:
We are 100% within the boundaries of that. PS: seems Mark quoted it here, too, while I was still typing ^^ |
So back to the original point of this thread. My proposal atm would be:
If users do nothing, their code still runs 100% as-is. They just see a strikethrough version of If that bothers them, they change one import name, and having acknowledged the fact that this is not the approach we want them doing, continue on their merry way, again with no code breaking. I'd still prefer to avoid any further package shuffling shenanigans, if only because I'm lazy and that promises to be a gigantic amount of work I'd rather not take on :) But, I'm at least open to having a completely separate thread that revisits the idea of moving packages around to at least see what people's thoughts/ideas are there, with the understanding that it's still a hypothetical thought exercise with no immediate plans to actually change the status quo. |
The way I see it is that the main appeal of base redux is at the very core of the 'boilerplate' people complain about: simplicity. RTK is an opinionated API layer, which promotes way more answers than questions were asked. Do I need that query stuff? Do I want to trigger side effects from component code at all? Do I want action creators or POJO actions? Do I want to define my event types? Do I want to use immer to avoid the spread-hell, or something else, like deep assign()? Do I want a general setter action when the user actually sets stuff? Do I want to use react as a 'glorified templating engine' and move business logic to middlewares, which can be easily migrated into state machines? (I do) Lots of questions from which a few not compatible with RTK is enough for a dev to decide not to use it. I think the core motivation to not wanting people to use the base version is at least questionable. I see the 'custom solutions/onboarding problem' argument questionable too: I've seen so many unpleasant code bases where the dev tried to follow the 'recommended way' in every corner, but it eventually led to many implicit decisions. (A typical case is reaching out to APIs in an ad hoc way, without thinking in patterns.) I also disagree with the semantics bending about the term 'deprecation'. The WP article mentions the 'removal' aspect permissively but I'd say it's the typical usage. It's also typical to deprecate something in favor of an alternative on the same abstraction level. The honest version here would be to separate the 'redux' and 'RTK' brand, and focus on RTK in your discord etc. activity. That way you wouldn't be bothered by people using redux. |
It's interesting that you have investigated consolidating the packages, and ultimately shelved it as an arduous task that would require significant maintainer time investment. It sounds like if it were a one click merge, you'd have done it by now. From what I'm reading, it feels like the most consternation is around consumers being strong armed into using an opinionated api layer they feel like they shouldn't be shamed into using. Is there an option to middle ground, now or in the future, where you don't blend the entire RTK but just port over what's needed for For right now that doesn't change much except perhaps the deprecation notice becomes an official "we are looking at ways to actively remove this as a public api, and replacing it with parts of RTK, but we're still working on the details" Perhaps this doesn't solve for "we want to teach people to use RTK", but it also feels like pinning all those hopes and dreams onto a single deprecation notice is unrealistic, and would have to be considered as one step in a many layered plan. |
In the interest of keeping this particular discussion focused on just the "deprecation" aspect, I've created a separate discussion thread to discuss whether changing the package structure is A) anything we would even want to meaningfully consider, B) feasible, C) what it would hypothetically look like: Discussion: Debate changing Redux packages to merge "Redux" and "RTK", again |
FWIW I don't think I'm "bending semantics" at all. What I'm describing exactly matches the Wikipedia definition I quoted: "discouraging use of a feature because it's been superseded, without completely removing it".
That really isn't going to happen, for multiple reasons. To us maintainers, RTK is "Redux" today. At the same time, we do have a responsibility to anyone using any Redux-related package. People are not going to stop asking questions, and we're not going to ignore questions just because they're using older practices. But trust me, it's realllly tiring to see yet another user posting a question in Discord and asking why their UI won't update, when RTK would have prevented that problem from ever happening in the first place. This goes into both the historical background of how long Redux has been out there, and the "power users" who are using the Redux core by itself and don't want anything else (ie, several of the people commenting in this thread). As I've said several times: we're not going to break anyone's code. Even when we put out major versions of our libraries, we aim to keep any potential changes to an absolute minimum. Sure, by the rules of semver we'd be totally clear to rename |
I don’t think it makes any sense to have a library be installed where the main entry point is deprecated. If the maintainers intend for a different library to be used, then deprecate the whole thing and recommend the other library. Having to install RTK just to use RTK is a different thing. It uses the Redux core internally, but it’s a different thing. Deprecating the core’s entry point just to push people to use RTK would leave a horrible taste in a lot of devs mouths, I think. |
There's a lot of debate here about semantics. At the end of the day, the idea here is to add a comment to the source code, as a way to encourage users to use the preferred tooling for the library, without breaking any existing code. There wouldn't be any console warnings, just a subtle visual indicator in certain IDEs that can gently nudge devs to investigate. Especially given the fact that there could be an alternative entry point that points to the exact same function and doesn't have that comment, I really don't see any real reason to oppose this. I've been working with redux for years and the only reason I found out about RTK was because I happened to see Mark post about it on twitter. But I would absolutely fit into the target audience for this change, in the sense that if I hadn't already heard about it, but I saw that So in short I'm strongly in favor of this proposed change, largely because if it had been there a year or two ago, I would have been able to avoid a lot of headaches because I would have heard of and adopted RTK much sooner. |
Given the discussions in this thread, I've just published a new Redux docs page: Introduction > Why Redux Toolkit is How to Use Redux Today It includes:
Hopefully this helps clarify some of the mindset here, and shows that Redux Toolkit really is "Redux", just improved. |
Just read the new docs page explaining RTK and its benefits over core Redux. Good job in that page, it's very well written. FWIW, after reading it I still came out of it feeling like I've felt in the past when I've read about RTK: looks great, specially for beginners, but I prefer vanilla Redux. I'll share two reasons here. First, Finally, to add some context, we use Redux to power Makeswift. It's been indispensable for the wire protocol we use for |
@zdhr "deprecated" does not necessarily mean "it will be removed", but "there is something better, please use that". And even with every other solution you might be using that is not Redux Toolkit, if you are manually calling
All of that not with positional argument, but with a configuration object, which makes it very obvious for the reader on first sight what is actually going on there. So, that single one fact alone is enough reason to deprecate one for the other. Even before we come to all the other reasons why we want to deprecate it - education being the most important one. |
I want to reword what I said before. I'm not against deprecating As for the suggestions to deprecate Hopefully the better explains why it feels weird to deprecate |
@migueloller we could of course just merge RTK into Redux, and honestly, at this point that would be the right thing to do if we were just having this whole discussion in a perfect world where there would not be two full sets of documentation maintained by essentially one person, two monorepos and 300k downloads of We are trying to find a solution that we can realistically do (and humanpower/worktime is part of the question here) without interrupting users too much. And as it stands, it would probably both interrupt our RTK users more, just as our "plain Redux package users" if we were to suddenly merge one into the other. (also the ensuing discussion would probably even be more heated than this one) |
@phryneas, I feel you. Another alternative is to deprecate So, what about merging |
If this happens, where do the community of folks using I wonder if there would be a way to automate this to reduce the burden on maintainers? We'd need to add a visual indicator on the entry point of the The |
@mattpocock, if |
@migueloller And what the others have said is that's an enormous job - moving the documentation around and refactoring the monorepo's. Adding a deprecation notice on |
I'm not suggesting a monorepo refactor, but simply deprecating all of Anyhow, it's just an idea/suggestion. It doesn't have to be this way. I'm just trying to propose something that would achieve the maintainers' goals (deprecate core Redux so that people use RTK instead without having to do tons of work merging RTK into Redux or refactoring monorepos). I'm probably missing something since I'm not a maintainer, so I'll let the maintainers decide whether my suggestion/idea is useful or not. |
It doesn't quite achieve the same thing. In my mind, having the two separate is causing a lot of the confusion and I feel like combining the two (even just in a monorepo and not the same package) would allow the messaging to be a lot more clear. For example, I think one website instead of two would make it a lot easier to communicate how to use Redux today. I'm not trying to say deprecating |
Well, for what it's worth, |
Personally I think package renames, with a monorepo and single website, are the best way to go:
This would include a migration guide that explains that This is obviously more work, but in mind way it's the best way to message how the maintainers feel about the current status of how these packages should be taught and used. |
On mobile and at a conference atm, but this is exactly the point I tried to make earlier. Truly deprecating the entire Redux core package is an option. So is moving all of RTK into the core package. But it really would require converting everything to a monorepo as part of that. That is a massive amount of work that we simply do not have the time or energy to do. Additionally, there's package whiplash. We already renamed RTK once. Our docs say to use it. I do not want to further confuse users by telling them to switch packages from RTK back to a combined "Redux" package. I am really, truly, trying to do the thing that will have the LEAST POSSIBLE DISRUPTION FOR ALL OUR USERS, and also not require hundreds of additional hours of unpaid labor for us maintainers, that we don't have time for, with very little net benefit for anyone in the end. And I don't understand why people are having a hard time accepting what I have repeatedly, clearly, and plainly stated about my motivations, intent, and constraints here. |
No. I quoted the definition of "deprecated" from Wikipedia. Deprecation does not always imply "removal". You're ignoring the plain statement I have made repeatedly about what I intend to do here.
Because we are the maintainers. We have spent thousands of hours writing documentation, responding to issues, answering question, fixing bugs, adding features. We have seen how people use Redux and what problems they run into. Quite frankly, you have not. Therefore, it's our responsibility to make decisions about how the libraries should evolve, based on what we think is going to result in the best experience for our users and help them with the things they're trying to build. It's really the story of the Little Red Hen. "If no one else is going to help me with this, I'll do it myself". We welcome input from the community. That's why I even filed this as an issue in the first place and asked for feedback. But at the end of the day it's our (unpaid! free time!) job to make the final decisions. |
Done. I've added the This is now live in Redux 4.2.0: |
Yeah, deprecating |
It doesn't really sound like "maintaining" when the course of action is effectively deprecating the original library, and replacing with a new high-level API. Surely there are people interested in actually maintaining the original, minimalistic Redux API, as conceived by Dan in 2015? Which is ultimately what originally gained huge traction, spawned a large ecosystem, and has acted as a solid foundation for countless projects over many years. While you may feel all those people are wrong, and the new approach is superior, couldn't this have been more easily shown by having the Redux Toolkit library's proposed "single standard approach" exist as its own library wrapping Redux, letting the numbers and adoption speak for themselves? Why does it need to come at the expense of all those who are still happily using Redux's original low-level API? Also, the presumption here that newcomers will pay attention to a deprecation notice, and "power users" can simply ignore it seems backwards to me. Newcomers are more likely to just follow whatever they see in their chosen tutorial, and be happy to have something that runs. Whereas experienced developers following best practices will be the ones who would not want to let a deprecated library call into their codebase. |
@jamesisaac Have you read the thread above? Your various proposals have been answered. The library itself is not being removed or left unmaintained. How would you propose dealing with the issues faced by the current maintainers?
This feels deeply unfair to Mark and Lenz - they are the reason for Redux's continued relevance and prosperity. |
@jamesisaac "maintainer" simply means "the people in charge". Some libraries call their team "team", other libraries call their team "maintainers", it's the same thing. Riding on that word is a horrible take. By the same logic, the React maintainers would not have been allowed to add ES6 classes, or hooks at a later time, because React with Also, you are free to fork Redux. Just don't assume you will have a lot of success - there are already 15000 redux-named packages on npm. Or just stay on the last version without the deprecation note. The Redux core is essentially done - those low-level apis are very unlikely to see any more changes, simply because after 7 years it is unlikely that anyone will come up with a newly found bug. (And remember, by your definition other than fixing bugs, there are no changes allowed.) |
@mattpocock Yes, I've read the whole thread. Where did I say the library was being removed/unmaintained? I said that a deprecation warning is hard for an experienced developer to ignore. Regardless of what the docblock says, many would see it as a red flag to have any deprecated library calls in a codebase.
How are you determining this? If the problem is that too many people are still being introduced to Redux on the original API, doesn't that indicate the original unopinionated API is responsible for a lot of the relevance and prosperity?
Perhaps there is some relevance behind the word, particularly in a library which is used as a foundation in so many projects (2.1 million according to the stats GitHub pulls together).
IMO this is not a reasonable comparison, as
I'm just sharing my opinion on the
I mean that was pretty much my stance, that "Redux core is essentially done", barring the occasional bug fix or tweak in underlying implementation. So I'm voicing the side of those who would find it useful to continue to use it that way without pinning to an old unmaintained version of the package. |
The only people giving that word any relevance are the intentions of the people calling themselves by that word. We could also just reference as ourselves as "team" from tomorrow on, it would not change how we work.
The solution to that is, as per the release notes, the following change at one line in your application: - import { createStore } from 'redux';
+ import { legacy_createStore as createStore } from 'redux'; You don't need to pin anything at all. It's just an option, if the above change seems too intrusive for you. |
Following-up on that one: The number of threads on twitter/reddit/hackernews saying "Redux is horrible" has decreased significantly while the number of threads saying "I like Redux again because of Redux Toolkit" has increased greatly. Fewer posts about "migrating away from the horrible boilerplate of Redux" are being written, or people are commenting under them that the author should really check out Redux Toolkit before daming the library. In the last few years, a lot of people have voiced very loudly that they hate Redux. Those voices have gotten a lot less, both in frequency and volume. Without our efforts working on Redux Toolkit, Redux would likely not be a tool that newcomers would still learn because of the perceived notion that it is outdated and should not be used nowadays. It would probably be an irrelevant legacy tool, given one or two more years. |
Ok, but then the point in my original comment still stands, that it would be helpful to let someone maintain (actual usage of the word) the low-level Redux API, while the "team" who wants to build out Redux Toolkit continues to do so. They seem to be complementary libraries serving different use-cases. Question on the new API - what are the solutions it provides for persistence (my main use-case for Redux)? A quick search through your docs and all the examples seem to use the
IMO a |
You can use redux-persist just as you did before. As redux-persist has been unmaintained for quite some time, it unfortunately still uses symbols as action types and you will get warnings about that with the serializability middleware enabled in development environments. The Redux Toolkit documentation describes how to exclude redux-persist from that warning in the Usage Guide until they put out a release fixing that (development on their side has begun again under a new maintainer). |
Yes, if you start a new greenfield application using an api that has been superseeded for three years, requires four times the amount of code and is much more susceptible to bugs, that writing should probably be on all walls. |
I do know the type of discussions you're talking about here, but IMO this is the vocal minority. I imagine there are many developers who have been happily building on Redux for a long time, who don't spend their time getting involved in beginners' discussions about "is Redux is still worth learning or not?". Personally I've revisited the Redux docs occasionally, read through the docs for RTK in the past, and decided it doesn't provide additional utility to me over base Redux. If I realised the eventual plan was to make it the only viable option, maybe I would have been more vocal earlier about how base Redux has served me perfectly since day 1.
Pairing it with a type system, I've had precisely zero of these problems. I've had another look over the RTK docs and to me it is just additional APIs, re-solving problems that were already solved by following best practices or combining other complementary libraries (which has the benefits of those solutions being applicable to a wider domain than just reducers). I do not see any way it would lead to reduction of verbosity or bugs for my usage patterns. I completely see your point that for a newcomer, jumping into RTK may be preferable. But my general point is that, Redux served its role extremely well as a low-level library, and it's nice having options available, with both solutions coexisting in parallel - which it doesn't seem there would be a barrier to. If "Redux core is essentially done", and people are writing all over forums "I like Redux again because of Redux Toolkit", then it sounds like RTK would become the preferred solution organically, without needing to be at the expense of deprecating a low-level tool, which has no actual deficiency, has a wide ecosystem, and many are productively using. |
sigh honestly: If you yourself are educated enough that you decide for yourself not to follow the officially recommended best practices that the Redux team is propagating in the documentation and the Redux Style Guide because you know better, you surely are also educated enough that you can read and understand the deprecation warning, which contains the information that the api itself is not going away and make the conscious decision to ignore the deprecation warning in the same way as you are ignoring the style guide. Ignoring one is the sameas ignoring the other. Both are an extremely clear "writing on the wall". It's your choice. Please stop complaining that you don't like one puzzle piece of that "writing on the wall". The decision has been made, the deprecation warning has been shipped, we are not going to take it back. |
This conversation is going in circles. All the points have been made, the release is already shipped, and further arguing isn't going to change things. |
We don't want anyone using the core
createStore
method directly in their apps today. We want them usingconfigureStore
from RTK instead.We should tag
createStore
as@deprecated
on both the 4.x and 5.x branches, and do another 4.x release.edit
After a bunch of discussion, it's become clear that a lot of people aren't familiar with what RTK actually is, or what the technical differences are between the core
createStore
API and RTK'sconfigureStore
. Let me provide some background resources.First, I had a chance to do a livestream with Jason Lengstorf where we explained what people disliked about Redux historically, and how RTK was created to solve those issues. We then built a small example app with RTK+TS:
Next, the "Modern Redux with RTK" tutorial page shows the differences in usage between "vanilla" Redux and RTK for things like store setup and writing reducers:
And for a lot of additional background on why RTK was created and how it evolved, see my "Redux Toolkit 1.0" announcement post.
For the actual technical differences, Lenz had a very good explanation on Twitter today:
There's some comparisons of the before and after setup here:
The text was updated successfully, but these errors were encountered: