Skip to content

v2.3.0

Latest

Choose a tag to compare

@raphi raphi released this 24 Oct 11:34
· 1 commit to main since this release
7000ab0

React 19 support

@placekit/autocomplete-react now supports React 19. Drop-in upgrade for React 16, 17 and 18: no code change needed.

Fixed

  • React 19: the geolocation button and the default placeholder were not rendered, because React 19 no longer applies defaultProps to function components. Defaults are now declared as parameter defaults (PlaceKit.defaultProps is kept for React 16 to 18 compatibility).
  • React 19 install: npm install no longer fails with ERESOLVE. Peer dependencies are now react / react-dom ^16 || ^17 || ^18 || ^19.
  • TypeScript with @types/react 19: Cannot find namespace 'JSX' in the type declarations. PlaceKit now returns React.ReactElement.

Note for React 19 users

If you were already running 2.2.x on React 19 (with --legacy-peer-deps), the geolocation button and the "Search places..." placeholder will now appear, as designed. Pass geolocation={false} to keep the button hidden.

Compatibility

Tested against 2.2.2 in Vite (React 16.14, 17.0.2, 18.3.1, 19.0), Next.js 14 pages router (SSR) and Next.js 15 app router (React 19.2), and TypeScript projects: identical rendering and behavior on React 16 to 18.

Full Changelog: v2.2.2...v2.3.0