Repository navigation
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
defaultPropsto function components. Defaults are now declared as parameter defaults (PlaceKit.defaultPropsis kept for React 16 to 18 compatibility). - React 19 install:
npm installno longer fails withERESOLVE. Peer dependencies are nowreact/react-dom^16 || ^17 || ^18 || ^19. - TypeScript with
@types/react19:Cannot find namespace 'JSX'in the type declarations.PlaceKitnow returnsReact.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