Skip to content

Instantly share code, notes, and snippets.

@muslemomar
Last active June 10, 2023 12:32
Show Gist options
  • Save muslemomar/b3811e417b72ea97dde3dde74e13f466 to your computer and use it in GitHub Desktop.
Save muslemomar/b3811e417b72ea97dde3dde74e13f466 to your computer and use it in GitHub Desktop.
React Query Exercise

React Query Exercise

Overview

This exercise focuses on creating a Next.js application that uses React Query to fetch data.

Instructions

  1. Create a NextJS application (the configurations are up to you, but make sure "App Router" is enabled, since you will need it in this app).
  2. Create a page for fetching all posts using this url: https://jsonplaceholder.typicode.com/posts
  3. Once a user clicks on a post, it should take him to another page that fetches a single post details https://jsonplaceholder.typicode.com/posts/:id.

IMPORTANT: make sure you use React Query for fetching data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment