-
-
Notifications
You must be signed in to change notification settings - Fork 464
Description
Issue template
Please provide an explanation of the issue
Hi there, first of all, thanks for your hard work on @react-google-maps/api!
I wanted to ask if you would be open to writing some documentation for the function components introduced in 2.10.0 such as MarkerF.
Right now they seem to be undocumented, aside from comments hidden in issues like this where your comment mentions them shortly as the way to go with React 18 (which is now the latest stable version of React):
use MarkerF instead for react@18
MarkerF is hook based, and has no issues.
Your Environment
os: macOS Monterey
node --version: 16.11.0
react version: 18
webpack version: Next.js 12.2.0 built-in
@babel version: No Babel, using SWC in Next.js
@react-google-maps/api version: 2.12.0
How does it behave?
Using Marker and other non-function components does not work with React 18, and the function components such as MarkerF are undocumented
How should it behave correctly?
The documentation should recommend the function components, since the other components do not work with the latest version of React and the philosophy of React is hooks-first.
Basic implementation of incorrect behavior in codesandbox.com
This is a request for a docs change, so no CodeSandbox.