ChainReactApp2023 icon indicating copy to clipboard operation
ChainReactApp2023 copied to clipboard

Refactor to use `Suspense` instead of `useLoading`

Open joshuayoes opened this issue 2 years ago • 1 comments
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

joshuayoes avatar Apr 12 '23 02:04 joshuayoes

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.

joshuayoes avatar Apr 20 '23 21:04 joshuayoes