React Advanced

0% completed

Previous
Next
Code Challenge

Challenge: Fetch and Display Data

Follow the instructions below to complete the challenge:

  1. Set Up React Query: Set up a QueryClientProvider in your app.

  2. Fetch Data from an API: Use useQuery to fetch data from a public API (e.g., https://jsonplaceholder.typicode.com/posts).

  3. Display the Fetched Data: Render a list of post titles and descriptions.

  4. Handle Loading and Error States: Show "Loading..." while fetching and an error message if the request fails.

.....

.....

.....

Like the course? Get enrolled and start learning!
Previous
Next