Skip to content

Commit 519d069

Browse files
committed
Update release notes
1 parent fa324c6 commit 519d069

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -390,23 +390,23 @@ The biggest set of changes in `7.8.0` are to the `unstable_middleware` API's as
390390
- The `UIMatch.data` type was not correctly handing this and would always reflect the presence of data, leading to the unexpected runtime errors when an `ErrorBoundary` was rendered
391391
- ⚠️ This may cause some type errors to show up in your code for unguarded `match.data` accesses - you should properly guard for `undefined` values in those scenarios.
392392

393-
```tsx
394-
// app/root.tsx
395-
export function loader() {
396-
someFunctionThatThrows(); // ❌ Throws an Error
397-
return { title: "My Title" };
398-
}
393+
```tsx
394+
// app/root.tsx
395+
export function loader() {
396+
someFunctionThatThrows(); // ❌ Throws an Error
397+
return { title: "My Title" };
398+
}
399399

400-
export function Layout({ children }: { children: React.ReactNode }) {
401-
let matches = useMatches();
402-
let rootMatch = matches[0] as UIMatch<Awaited<ReturnType<typeof loader>>>;
403-
// ^ rootMatch.data is currently incorrectly typed here, so TypeScript does
404-
// not complain if you do the following which throws an error at runtime:
405-
let { title } = rootMatch.data; // 💥
400+
export function Layout({ children }: { children: React.ReactNode }) {
401+
let matches = useMatches();
402+
let rootMatch = matches[0] as UIMatch<Awaited<ReturnType<typeof loader>>>;
403+
// ^ rootMatch.data is currently incorrectly typed here, so TypeScript does
404+
// not complain if you do the following which throws an error at runtime:
405+
let { title } = rootMatch.data; // 💥
406406

407-
return <html>...</html>;
408-
}
409-
```
407+
return <html>...</html>;
408+
}
409+
```
410410

411411
- `@react-router/dev` - Fix rename without mkdir in Vite plugin ([#14105](https://github.com/remix-run/react-router/pull/14105))
412412

0 commit comments

Comments
 (0)