Skip to content

Commit

Permalink
docs: add important rule page
Browse files Browse the repository at this point in the history
  • Loading branch information
pyjun01 committed Dec 19, 2023
1 parent 38c58e5 commit 4cb34db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default defineConfig({
label: 'Quick Start',
link: '/docs/quick-start',
},
{
label: 'Important Rule',
link: '/docs/important-rule',
},
],
},
{
Expand Down
9 changes: 9 additions & 0 deletions docs/src/content/docs/docs/important-rule.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Important Rule
---

- **You need to set `height` of map**, or else it won't show up. (see the example below)
- 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`)
- All components are _uncontrolled_. To render a controlled component, pass the props it needs to render and related event callback.
- `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.
- **Google Maps API doesn't support SSR. Please use it only in client component.**
6 changes: 4 additions & 2 deletions docs/src/content/docs/docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ title: Quick Start
import { QuickStart } from '../../../components/QuickStart';

- **You need to set `height` of map**, or else it won't show up. (see the example below)
- 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`)
- **Currently we don't support SSR. Please use it with CSR only.**
- 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`)
- All components are _uncontrolled_. To render a controlled component, pass the props it needs to render and related event callback.
- `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.
- **Google Maps API doesn't support SSR. Please use it only in client component.**

<br />
<hr />
Expand Down

0 comments on commit 4cb34db

Please sign in to comment.