Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lesenelir/suspense

Data fetching with React Suspense Component.
https://github.com/lesenelir/suspense

Last synced: 9 days ago
JSON representation

Data fetching with React Suspense Component.

Awesome Lists containing this project

README

        

# suspense

Data fetching with React Suspense Component.

### 3 ways to fetch data in React

- Render, and then fetch

- Fetch, and then render
- fetch early, get a response early

- Render as you fetch
- Initiate Data Fetching: Start fetching data before rendering UI.
- Initiate Rendering: Begin rendering immediately without waiting for data to complete.
- Suspense for handling loading state: render a fallback before the data is prepared.
- Render Final UI: Once the data is ready, complete the component's rendering.