-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend] upgrade to react-query v5 (#14346)
## Description This PR upgrades our codebase and frontend SDKs to use react-query v5 which was released yesterday. @Jordan-Mysten did 98% of the work here (thx bud), but to cover the migration list/changes here: https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5 - Explicitly set `initialPageParam` to null for all infinite queries (this starts us at the first page) - Modified typings for `useSuiClientQuery` and `useSuiClientInfiniteQuery` to support data transformations via `select` - Removed onSuccess, onError, onSettled callbacks on `useQuery` in favor of side effects - Renamed `isLoading` -> `isPending` which would be equivalent in the pre-v5 world - Replaced deprecated `isInitialLoading` with `isLoading` which is now equivalent - Replaced `keepPreviousData` property with `placeholderData: keepPreviousData` - Replaced `dehydrateQueries` with `shouldDehydrateQuery` - Renamed `cacheTime` -> `gcTime` As a side note, the whole `isPending` vs `isLoading` concept is pretty confusing to wrap your ahead around. I didn't change anything functionality-wise, but that isn't to say that we're using the correct status field everywhere in our codebase: `isPending` = no data is available (e.g. the query is disabled) `isLoading` = we're actively fetching data ## Test Plan - Going to manually test all of our applications and core flows work as expected just in case we missed something - Won't land this until next week when we've done said testing ^ - Existing tests - CI --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes --------- Co-authored-by: Jordan Gensler <[email protected]>
- Loading branch information
1 parent
fda8225
commit d4d9c92
Showing
151 changed files
with
668 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@mysten/create-dapp': minor | ||
'@mysten/dapp-kit': minor | ||
--- | ||
|
||
Upgrade dapp-kit and the scaffold applications to react-query v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d4d9c92
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.
Successfully deployed to the following URLs:
sui-kiosk – ./dapps/kiosk
sui-kiosk-git-main-mysten-labs.vercel.app
sui-kiosk.vercel.app
sui-kiosk-mysten-labs.vercel.app
d4d9c92
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.
Successfully deployed to the following URLs:
explorer – ./apps/explorer
explorer-git-main-mysten-labs.vercel.app
explorer-topaz.vercel.app
suiexplorer.com
explorer-mysten-labs.vercel.app
www.explorer.sui.io
www.suiexplorer.com
explorer.sui.io
d4d9c92
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.
Successfully deployed to the following URLs:
multisig-toolkit – ./dapps/multisig-toolkit
multisig-toolkit.vercel.app
multisig-toolkit-mysten-labs.vercel.app
offline-signer-helper.vercel.app
multisig-toolkit-git-main-mysten-labs.vercel.app
d4d9c92
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.
Successfully deployed to the following URLs:
mysten-ui – ./apps/ui
mysten-ui-mysten-labs.vercel.app
mysten-ui.vercel.app
mysten-ui-git-main-mysten-labs.vercel.app
d4d9c92
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.
Successfully deployed to the following URLs:
sui-typescript-docs – ./sdk/docs
sui-typescript-docs.vercel.app
sui-typescript-docs-mysten-labs.vercel.app
sui-typescript-docs-git-main-mysten-labs.vercel.app
sui-wallet-kit.vercel.app