ChainReactApp2023
ChainReactApp2023 copied to clipboard
Refactor to use `Suspense` instead of `useLoading`
trafficstars
Description
As an experiment, this PR refactors TanStack query to utilize Suspense to handle loading states instead of isLoading conditional.
https://tanstack.com/query/v4/docs/react/guides/suspense
This will require some further investigation to figure out whether or not this is a useful pattern, has performance benefits, etc.
Graphics
| Device | Before | After |
|---|---|---|
| iOS | ||
| Android | n/a | n/a |
Checklist:
- [ ] I have done a thorough self-review of my code
- [ ] I have tested with a screen reader and font-scaling turned on and added necessary accessibility features
- [ ] I have run tests and linter
This PR was for the sake of exploring a pattern for the New Architecture workshop. This doesn't need to be merged.
The only benefit to this PR is being able to use Suspense as a new pattern. If that is useful, then it's worth merging. Otherwise, it's worth leaving as is.