-
Notifications
You must be signed in to change notification settings - Fork 664
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
feat: enhanced provider API / @tanstack/react-query
peer dependency
#1934
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@magiziz Noticed the address -> resolved name is a bit slow, even after the first fetch. Seeing a few network requests after leaving the page idle too. Are we taking advantage of react-query caching? https://github.com/rainbow-me/rainbowkit/assets/4412473/307f133e-0b26-49dd-b092-91b215adaf9d |
Also pushed up some tweaks, mainly one that injects the API key at build-time. This can be a bit messy because it also needs to be available within the CI tests (where we can't statically replace the API key). Lmk if you have other thoughts! It will be skipped in CI here because we need to add a new ENV. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When replicating a 401, I noticed we throw console errors and try to re-fetch every few seconds. We should fail more gracefully because we may wind down this API endpoint some day. Max retry should be limited, and we should only need to fetch once at first-render if the caching is working appropriately
c1814c2
to
6dc04b5
Compare
import { describe, expect, it } from 'vitest'; | ||
import { enhancedProviderHttp } from './enhancedProvider'; | ||
|
||
describe.skip('createHttpClient', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do a follow up PR to fix this unit test. Faces issues with github secrets and process.env
, but we can run this locally for now.
…ependency fix: append provider api key at build time, skip tests if unavailable chore: align rainbow fetch with other codebases chore: rearrange core utils
4b68ed4
to
ac234b2
Compare
Force pushed to cleanup the git history here |
Changes
@tanstack/react-query
as a peer dependency and introduced enhanced provider API.What to test