Commit 5b35b66
authored
fix(AlertBadge): return type (#1881)
## 📝 Changes
- Fixes the return type in `AlertBadge` causing type errors in consumers
with the added React 19 support
> In React 19, ReactNode was expanded to include bigint and
Promise<AwaitedReactNode>. When a component returns children (typed as
ReactNode) directly, TypeScript sees the return type as the full
ReactNode union, which includes types that aren't assignable to what JSX
expressions expect from a component. The consumer's React 18 types don't
understand Promise or bigint as valid JSX return types, causing the
mismatch.1 parent 3f515b3 commit 5b35b66
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments