visgl / react-google-maps

React components and hooks for the Google Maps JavaScript API
https://visgl.github.io/react-google-maps/
MIT License
1.31k stars 110 forks source link

[Feat] Support nextjs 15 #596

Closed nilsingwersen closed 19 hours ago

nilsingwersen commented 2 weeks ago

Target Use Case

If you use nextjs 15 with react 19 and you try to install the library you get an error because of the peer dependency. shadcn has a great article about this: https://ui.shadcn.com/docs/react-19

Proposal

As a first step add react 19 as peer dependency.

usefulthink commented 2 weeks ago

I find it hard to understand why "react": ">=16.8.0" doesn't match the versions 19.0.0-rc-*, but changing this should be fairly straightforward if the library does in fact work without problems in react 19.

mrMetalWood commented 2 weeks ago

Came across this last week as well. I'm working on a basic NextJS example at the moment. Will address this when adding the example

camilo86 commented 1 week ago

Came across this problem in next 15. For now, you can install with npm install @vis.gl/react-google-maps --force

mrMetalWood commented 19 hours ago

This should be solved with 1.4.1 (just released)