Skip to content

Conversation

@Andarist
Copy link
Contributor

fixes #875

@vercel
Copy link

vercel bot commented Oct 25, 2025

@Andarist is attempting to deploy a commit to the Brian Vaughn's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Andarist Andarist force-pushed the fix/return-type-serialization branch from 3dd1b4c to aea1dc5 Compare October 25, 2025 21:13
@bvaughn
Copy link
Owner

bvaughn commented Oct 26, 2025

Wow! This is very kind of you. Thanks, @Andarist!

@vercel
Copy link

vercel bot commented Oct 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
react-window Ready Ready Preview Oct 26, 2025 8:39pm

@bvaughn
Copy link
Owner

bvaughn commented Oct 26, 2025

Just tested this and it works with React 18.3+ and 19.0+ but it fails with React <= 18.2:

src/App.tsx:15:25 - error TS2339: Property 'index' does not exist on type '{}'.

15 function RowComponent({ index, style }: RowComponentProps<object>) {

The underlying cause of which is:

Module '"react"' has no exported member 'JSX'.ts(2305)

Replacing the JSX return type with ReactElement<any, any> causes a different underlying issue for CellComponentProps and RowComponentProps that also breaks the build:

Type 'ReactNode' is not assignable to type 'ReactElement<any, any> | null'.

Though I think that one can be fixed by changing the return type annotation for cellComponent and rowComponent to also be ReactElement.

@bvaughn bvaughn merged commit 5d59563 into bvaughn:master Oct 26, 2025
6 checks passed
@bvaughn bvaughn mentioned this pull request Oct 26, 2025
@Andarist
Copy link
Contributor Author

Wow! This is very kind of you. Thanks, @Andarist!

Always happy to help out :)

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.

tsc error with 2.2.1

2 participants