You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -390,23 +390,23 @@ The biggest set of changes in `7.8.0` are to the `unstable_middleware` API's as
390
390
- 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
391
391
- ⚠️ 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.
392
392
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
+
}
399
399
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; // 💥
406
406
407
-
return <html>...</html>;
408
-
}
409
-
```
407
+
return <html>...</html>;
408
+
}
409
+
```
410
410
411
411
- `@react-router/dev` - Fix rename without mkdir in Vite plugin ([#14105](https://github.com/remix-run/react-router/pull/14105))
0 commit comments