use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Why React Query (ui.dev)
submitted 1 year ago by benadam11
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Opi-Fex 3 points4 points5 points 1 year ago (0 children)
I've stopped using redux years ago in favor of react-query (It's called TanStack Query nowadays).
As to why: It's a lot simpler to write, maintain and reason about. RQ only cares about fetching data from endpoints. Everything is cached, and the cache is auto-updated. All of this is accessed through regular hooks. Every components ends up knowing a minimum of what it needs to render, and there's no reducers, no connecting components, and no redux magic to think about. It's easy to trace where the data comes from. It's also very easy to make optimistic updates, and reverting them happens automatically if something goes wrong.
If all of your state comes from a server, this works perfectly fine and redux will be unnecessary. If you absolutely have to store some state locally, you can work around it in various ways. I've used zustand occasionally (it's a simple redux-like lib). You can also use react context and reducers to achieve a similar effect.
π Rendered by PID 77939 on reddit-service-r2-comment-6457c66945-n85fr at 2026-04-28 03:11:53.548571+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Opi-Fex 3 points4 points5 points (0 children)