Skip to content
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

chore(React): Update support react 19 #516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joaogarin
Copy link
Contributor

@joaogarin joaogarin commented Dec 30, 2024

Description

This PR ads support for React 19.

This pull request updates the codebase to ensure compatibility with React 19 and improves type safety by explicitly specifying React.JSX.Element instead of JSX.Element. The most important changes include modifications to the package.json file and updates to various component files to reflect the new type definitions.

  • Ran npm run lint and its passing
  • Ran npm run test and all tests passing
  • Ran locally and check that the element is working

Compatibility updates:

  • package.json: Updated peerDependencies to include React 19 and updated @types/react and @types/react-dom to version 19.0.2. [1] [2]

Type safety improvements:

  • example/src/app.tsx: Changed the return type of the App component to React.JSX.Element.
  • src/Geosuggest.tsx: Updated the return type of the render method to React.JSX.Element and modified the ref callback to include type annotations.
  • src/input.tsx: Changed the return type of the render method to React.JSX.Element and updated the ref callback to include type annotations. [1] [2]
  • src/suggest-item.tsx: Updated various methods and properties to use React.JSX.Element for type safety. [1] [2] [3] [4] [5]
  • src/suggest-list.tsx: Modified the render method to return React.JSX.Element and updated type definitions for properties. [1] [2]
  • src/types/props.ts: Updated the renderSuggestItem property to use React.JSX.Element.

Checklist

  • All tests passing
  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary
  • Commits and PR follow conventions

@joaogarin joaogarin mentioned this pull request Dec 30, 2024
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.

1 participant