Skip to content

Commit

Permalink
lesson updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dtauer committed Nov 13, 2024
1 parent daa5b60 commit d1988d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lessons/05-ecosystem/B-tanstack-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const queryClient = new QueryClient()

Now in the bottom right of your window you'll see a 🏝️. Click on that and we'll open the dev tools. We haven't used the dev tools yet so it'll be empty.

So react-query makes interacting with APIs very simple and makes it easy to read. You just read a hook and it'll either give you a `isLoading` status or the data. Once the data comes back, it'll refresh the component with the data. So let's start by writing our very simple fetch call. Create a folder called `api` inside of `src` and create getPastOrders.js and put
So react-query makes interacting with APIs very simple and makes it easy to read. You just read a hook and it'll either give you a `isLoading` status or the data. Once the data comes back, it'll refresh the component with the data. So let's start by writing our very simple fetch call. Create a folder called `api` inside of `src` and create `getPastOrders.js` and add:

```javascript
export default async function getPastOrders(page) {
Expand All @@ -80,7 +80,7 @@ export default async function getPastOrders(page) {

Very simple request to an API that returns data. That's it!

Let's now go make past.lazy.jsx.
Let's now go make `past.lazy.jsx`.

```javascript
import { useState } from "react";
Expand Down

0 comments on commit d1988d9

Please sign in to comment.