Skip to content

Commit 4cb34db

Browse files
committed
docs: add important rule page
1 parent 38c58e5 commit 4cb34db

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

docs/astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export default defineConfig({
2323
label: 'Quick Start',
2424
link: '/docs/quick-start',
2525
},
26+
{
27+
label: 'Important Rule',
28+
link: '/docs/important-rule',
29+
},
2630
],
2731
},
2832
{
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Important Rule
3+
---
4+
5+
- **You need to set `height` of map**, or else it won't show up. (see the example below)
6+
- If you want to access to the <a href='https://developers.google.com/maps/documentation/javascript/reference/map#Map' target='_blank' rel='noreferrer'>map</a> instance, we recommend using `useMapContext` inside of `GoogleMap` component. (or you can just using `ref`)
7+
- All components are _uncontrolled_. To render a controlled component, pass the props it needs to render and related event callback.
8+
- `react-google-map-wrapper` doesn't force components to always display by the data you pass. For example, if you drag a marker without passing a drag-related event callback to it, the actual position of the marker will be different from the position you passed(lat, lng). because you didn't get the changed position in the event callback.
9+
- **Google Maps API doesn't support SSR. Please use it only in client component.**

docs/src/content/docs/docs/quick-start.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ title: Quick Start
55
import { QuickStart } from '../../../components/QuickStart';
66

77
- **You need to set `height` of map**, or else it won't show up. (see the example below)
8-
- If you want to access to the <a href='https://developers.google.com/maps/documentation/javascript/reference/map#Map' target='_blank' rel='noreferrer'>map</a> instance, we recommend using `useMapContext` inside of `GoogleMap` component. (or you can using `ref`)
9-
- **Currently we don't support SSR. Please use it with CSR only.**
8+
- If you want to access to the <a href='https://developers.google.com/maps/documentation/javascript/reference/map#Map' target='_blank' rel='noreferrer'>map</a> instance, we recommend using `useMapContext` inside of `GoogleMap` component. (or you can just using `ref`)
9+
- All components are _uncontrolled_. To render a controlled component, pass the props it needs to render and related event callback.
10+
- `react-google-map-wrapper` doesn't force components to always display by the data you pass. For example, if you drag a marker without passing a drag-related event callback to it, the actual position of the marker will be different from the position you passed(lat, lng). because you didn't get the changed position in the event callback.
11+
- **Google Maps API doesn't support SSR. Please use it only in client component.**
1012

1113
<br />
1214
<hr />

0 commit comments

Comments
 (0)