Skip to content

fix(AlertBadge): return type#1881

Merged
stephenjwatkins merged 2 commits intomainfrom
alertbadge-ts
Apr 8, 2026
Merged

fix(AlertBadge): return type#1881
stephenjwatkins merged 2 commits intomainfrom
alertbadge-ts

Conversation

@stephenjwatkins
Copy link
Copy Markdown
Member

@stephenjwatkins stephenjwatkins commented Apr 8, 2026

📝 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. 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.

@stephenjwatkins stephenjwatkins marked this pull request as ready for review April 8, 2026 17:05
@stephenjwatkins stephenjwatkins requested review from a team as code owners April 8, 2026 17:05
Copy link
Copy Markdown
Contributor

@ralexmatthews ralexmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@stephenjwatkins stephenjwatkins merged commit 5b35b66 into main Apr 8, 2026
6 checks passed
@stephenjwatkins stephenjwatkins deleted the alertbadge-ts branch April 8, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants