4 ms·
This looks like a really great library for simplifying API interactions. I'm curious though if there's any way to indicate that a component depends on more tha
by netghost 10y ago
This looks like a really great library for simplifying API interactions.
I'm curious though if there's any way to indicate that a component depends on more than one end point. Would you just wrap it in multiple `connectRequest` wrappers?
- ryanashcraft 10y agoAuthor here. Thanks! That's what we do. It's an OK workaround but ideally `connectRequest` would support multiple queries. Another workaround is to manually dispatch `requestAsync` actions, which might be necessary if you need to chain the requests.
- HorizonXP 10y agoWe were just about to start migrating to GraphQL and Apollo, so this definitely came out at the right time. Our issue is that our API is nested, and does require many nested requests. This would probably be the best solution for us though. Unfortunately, I don't see anything related to server-side rendering?
- ryanashcraft 10y agoYeah server-side rendering hasn't been a focus for us. Currently, I don't think it is a great solution for server-side-rendered apps. I'm not exactly sure how much it would take to improve things here. If you have any thoughts around multiple requests or server-side rendering feel free to submit an issue on Github to discuss! https://github.com/amplitude/redux-query/issues https://github.com/amplitude/redux-query/issues
- limscoder 10y agoDoes it de-dupe requests if multiple components need the same URL?