Skip to content

Commit 391dadb

Browse files
authored
Fix typos in lazy.md and cache.md (#7141)
1 parent c2d6131 commit 391dadb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/content/reference/react/cache.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ By caching a long-running data fetch, you can kick off asynchronous work prior t
226226
```jsx [[2, 6, "await getUser(id)"], [1, 17, "getUser(id)"]]
227227
const getUser = cache(async (id) => {
228228
return await db.user.query(id);
229-
})
229+
});
230230

231231
async function Profile({id}) {
232232
const user = await getUser(id);
@@ -327,7 +327,7 @@ In general, you should use [`useMemo`](/reference/react/useMemo) for caching a e
327327
'use client';
328328

329329
function WeatherReport({record}) {
330-
const avgTemp = useMemo(() => calculateAvg(record)), record);
330+
const avgTemp = useMemo(() => calculateAvg(record), record);
331331
// ...
332332
}
333333

src/content/reference/react/lazy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Now that your component's code loads on demand, you also need to specify what sh
7878
<Suspense fallback={<Loading />}>
7979
<h2>Preview</h2>
8080
<MarkdownPreview />
81-
</Suspense>
81+
</Suspense>
8282
```
8383

8484
In this example, the code for `MarkdownPreview` won't be loaded until you attempt to render it. If `MarkdownPreview` hasn't loaded yet, `Loading` will be shown in its place. Try ticking the checkbox:

0 commit comments

Comments
 (0)