Skip to content

feat: compatibility with React 19 types #1299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

aymeric-giraudet
Copy link
Member

Summary

See #1297

We were relying on the ambient module from @types/react which is a devDependency of the monorepo itself, but since React 19 JSX is no longer global and that made certain files in autocomplete-shared and autocomplete-js fail type check.

Result

Changed JSX.Element to VNode<any> in the code as it's equivalent :
https://github.com/preactjs/preact/blob/4b7e23194bf61ab3764b9d86adb22a4aeafd67ec/src/jsx.d.ts#L63

@aymeric-giraudet aymeric-giraudet requested review from a team, sarahdayan and Haroenv and removed request for a team January 20, 2025 17:15
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f1c5a73:

Sandbox Source
@algolia/autocomplete-example-github-repositories-custom-plugin Configuration
@algolia/autocomplete-example-instantsearch Configuration
@algolia/autocomplete-example-playground Configuration
@algolia/autocomplete-example-preview-panel-in-modal Configuration
@algolia/autocomplete-example-starter-algolia Configuration
@algolia/autocomplete-example-starter Configuration
@algolia/autocomplete-example-reshape Configuration
@algolia/autocomplete-example-vue Configuration

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

change in types lgtm, just want to change the name of the react-17 folder or maybe delete it if it's superfluous with the regular react example

@aymeric-giraudet aymeric-giraudet merged commit 77599c6 into next Jan 21, 2025
10 checks passed
@aymeric-giraudet aymeric-giraudet deleted the feat/react-19 branch January 21, 2025 09:47
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