Skip to content

Commit 574fb8e

Browse files
committed
chore: Update README for npm install instructions
1 parent 76a78b9 commit 574fb8e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Description
44

5-
This repository contains a React Native plugin that provides a [Google Navigation](https://developers.google.com/maps/documentation/navigation) widget to React Native apps targeting Android and iOS.
5+
This repository contains a React Native plugin that provides a [Google Navigation](https://developers.google.com/maps/documentation/navigation) component for building native Android and iOS apps using React.
66

77
> [!NOTE]
88
> This package is in Beta until it reaches version 1.0. According to [semantic versioning](https://semver.org/#spec-item-4), breaking changes may be introduced before 1.0.
@@ -29,11 +29,17 @@ This repository contains a React Native plugin that provides a [Google Navigatio
2929
3030
## Installation
3131

32-
1. To install the library run the following command from your project root:
32+
This package is listed on NPM as [@googlemaps/react-native-navigation-sdk](https://www.npmjs.com/package/@googlemaps/react-native-navigation-sdk). Install it with:
3333

34-
`npm install --save https://github.com/googlemaps/react-native-navigation-sdk#{version_tag}`
34+
```shell
35+
npm i @googlemaps/react-native-navigation-sdk
36+
```
37+
38+
In your TSX or JSX file, import the components you need:
3539

36-
For more details, see [Google Navigation SDK Documentation](https://developers.google.com/maps/documentation/navigation).
40+
```tsx
41+
import { NavigationView } from '@googlemaps/react-native-navigation-sdk';
42+
```
3743

3844
### Android
3945

@@ -120,8 +126,8 @@ import {request, PERMISSIONS, RESULTS} from 'react-native-permissions';
120126
// Request permission for accessing the device's location.
121127
const requestPermissions = async () => {
122128
const result = await request(
123-
Platform.OS === "android" ?
124-
PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION :
129+
Platform.OS === "android" ?
130+
PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION :
125131
PERMISSIONS.IOS.LOCATION_ALWAYS,
126132
);
127133

0 commit comments

Comments
 (0)