https://github.com/thefrontside/effection-react-loadingspinner
Demo of a sophisticated loading spinner using structured concurrency with Effection
https://github.com/thefrontside/effection-react-loadingspinner
Last synced: over 1 year ago
JSON representation
Demo of a sophisticated loading spinner using structured concurrency with Effection
- Host: GitHub
- URL: https://github.com/thefrontside/effection-react-loadingspinner
- Owner: thefrontside
- Created: 2023-12-12T18:02:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T18:30:44.000Z (over 2 years ago)
- Last Synced: 2025-01-17T00:44:01.571Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://effection-react-loadingspinner.netlify.app
- Size: 178 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Loading Spinner with Effection in React
Example of a detailed loading spinner implemented as a hook. It gives users feedback when the request takes too long to load. It automatically retries up to 3 times if the request fails.
- [`App.tsx`][app-tsx] - shows all of the scenarios executed by the spinner
- [`useLoader hook`][useloader-hook] - executes the operation
- [`createLoader`][create-loader] - the main operation that executes the entire loader
- [`createSpinner`][create-spinner] - operation responsible for presenting the loading spinner
- [`LoadingSpinner component`][loading-spinner-component] - the component that's responsible for showing all of the spinners
[app-tsx]: /src/App.tsx
[useloader-hook]: src/hooks/useLoader.ts
[create-loader]: src/operations/createLoader.ts
[create-spinner]: src/operations/createSpinner.ts
[loading-spinner-component]: src/components/LoadingSpinner.tsx