TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Redux-query – A React/Redux library for querying and managing network state

127 pointsby ryanashcraftover 8 years ago

13 comments

acemarkeover 8 years ago
If anyone&#x27;s interested, I maintain a list of Redux-related addons and utilities over at <a href="https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;redux-ecosystem-links" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;redux-ecosystem-links</a> . Includes just about every vaguely-useful-looking middleware, action-generation utility, devtool, store enhancer, fill-in-category-here, that I&#x27;ve seen out there.<p>(And yes, I already had redux-query in the list before this post :) )
评论 #13649855 未加载
评论 #13647362 未加载
stymaarover 8 years ago
I love react, with the reusable components and the ergonomic of jsx but I really don&#x27;t like what redux does to your code: it involves too much magic, you lose the concept of independent components and every change becomes a global one: everybody is notified of the inner state of each component …<p>To me it just break all encapsulation and just lead to massive tangled code that is really hard to maintain …<p>Edit: I want to clarify what I mean with the «too much magic» part. It&#x27;s not redux itself which has too much magic in it, just your application flow that becomes magic when using redux, especially with libraries like the one showed by this article or redux-form[1].<p>[1]: <a href="http:&#x2F;&#x2F;redux-form.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;redux-form.com&#x2F;</a>
评论 #13646134 未加载
评论 #13645653 未加载
评论 #13648066 未加载
评论 #13645639 未加载
评论 #13645931 未加载
评论 #13646950 未加载
评论 #13645809 未加载
评论 #13646924 未加载
评论 #13645888 未加载
评论 #13650430 未加载
arbesfeldover 8 years ago
This is really cool! We have been using react-refetch from Heroku [1] for a similar purpose and it will be nice to have all our state in Redux. Another perk is that LogRocket [2] will capture this data now :)<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;heroku&#x2F;react-refetch" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;heroku&#x2F;react-refetch</a> [2] <a href="https:&#x2F;&#x2F;logrocket.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;logrocket.com&#x2F;</a>
tonyhbover 8 years ago
Heh, I made the same thing but with global endpoints and swappable drivers so that components can be shared and endpoints can be stubbed&#x2F;mocked: <a href="https:&#x2F;&#x2F;gitHub.com&#x2F;tonyhb&#x2F;tectonic" rel="nofollow">https:&#x2F;&#x2F;gitHub.com&#x2F;tonyhb&#x2F;tectonic</a><p>Think that genraally we&#x27;re learning that these things should be automated for us: loading data traditionally sucks. GraphQL is really where it&#x27;s at!<p>edit: that mobile keyboard though...
评论 #13645734 未加载
评论 #13645878 未加载
gtf21over 8 years ago
I&#x27;ve been having this discussion both in my own head and with my team for the last couple of weeks and have been thinking about how to implement something like this (but haven&#x27;t got around to it). Looks great!
limscoderover 8 years ago
I&#x27;ve been experimenting with using a component to fetch data. The data to fetch is declaratively described as props.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;limscoder&#x2F;react-wrangler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;limscoder&#x2F;react-wrangler</a><p>It uses immutable and allows for time travel debugging.
评论 #13649392 未加载
mpolichetteover 8 years ago
This is cool, I was looking a library which would help me with CRUD and paging data recently and there weren&#x27;t a lot of great options. So I started working on a library which ended up looking kind of similar to this.<p>One of the goals I&#x27;ve had is to stay encapsulated and not force any decision on the developer for the request library like redux-query does. I also try to avoid touching their data.<p>It isn&#x27;t quite flushed out all the way, and needs more test, but I&#x27;ve started using it and enjoyed the way it works.<p>I&#x27;d love any feedback if anyone wanted to check it out, <a href="https:&#x2F;&#x2F;github.com&#x2F;SpinGo&#x2F;crudux" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SpinGo&#x2F;crudux</a>
netghostover 8 years ago
This looks like a really great library for simplifying API interactions.<p>I&#x27;m curious though if there&#x27;s any way to indicate that a component depends on more than one end point. Would you just wrap it in multiple `connectRequest` wrappers?
评论 #13646564 未加载
Rodeoclashover 8 years ago
I&#x27;m very surprised that Relay is not getting more traction in this space. Given, it&#x27;s a lot of work to get it set up and running but once it&#x27;s in place it&#x27;s great. I haven&#x27;t found a library that manages network state and the associated difficulties that come with it better.<p>No reason why you cannot combine both Redux + Relay, in fact once the app gets to a certain size and you want to rely less on passing around long chains of callbacks and state objects then you pretty much have to implement either Redux, Mobx or similar.
评论 #13647945 未加载
评论 #13647748 未加载
weqover 8 years ago
Everyone says redux and react make for great component isolation.<p>How many of you people who use this combo can swap redux out at a whim, for another state management tool? How many of your components have been modified to work with the opinions of redux? Why do i need to couple my components with redux using connect()?<p>In my experience, redux and react on there own present decent patterns to simplify UI experience, but ive never seen a discussion that involves them that doesnt couple one with the other.
评论 #13650578 未加载
评论 #13650330 未加载
评论 #13650661 未加载
ex3ndrover 8 years ago
Nice component, we are working internally on something same, but for Kotlin.Js + React (nothing to show yet), but i have one question:<p>How to solve a problem when same entities have different fields, for example: List of members of a chat should display avatar, name and username, but viewing profile usually use much much more data to display. How to merge them? How to keep fields in sync and not to download everything in all requests. For example, loading all members can be slow when fetching full user profiles and should be avoided.
sktrdieover 8 years ago
I don&#x27;t understand how this solution differs from actual side-effects managing libraries such as redux-saga or redux-cycles. Network requests are certainly side-effects and putting all their logic together with your Container code seems like a code-smell.
cel1neover 8 years ago
I managed network state using react in the DOM itself, using hidden divs with custom onDidMount, onWillUnmount hooks. Worked really well.