Skip to content

Commit 135b7cd

Browse files
committed
Update installation in README
1 parent 9e10f40 commit 135b7cd

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@
2020

2121
## Installation
2222

23-
```
23+
```sh
24+
# pnpm
25+
pnpm add react-use-intercom
26+
27+
# npm
28+
npm install react-use-intercom
29+
30+
# yarn
2431
yarn add react-use-intercom
2532
```
2633

2734
## Quickstart
2835

29-
```js
36+
```ts
3037
import * as React from 'react';
3138

3239
import { IntercomProvider, useIntercom } from 'react-use-intercom';
@@ -86,7 +93,7 @@ Place the `IntercomProvider` as high as possible in your application. This will
8693
| autoBootProps | IntercomProps | Pass properties to `boot` method when `autoBoot` is `true` | false | |
8794

8895
#### Example
89-
```javascript
96+
```ts
9097
const App = () => {
9198
const [unreadMessagesCount, setUnreadMessagesCount] = React.useState(0);
9299

@@ -143,7 +150,7 @@ Used to retrieve all methods bundled with Intercom. These are based on the offic
143150
| showSpace | (spaceName: IntercomSpace) => void | Opens the Messenger with the specified space
144151

145152
#### Example
146-
```javascript
153+
```ts
147154
import * as React from 'react';
148155

149156
import { IntercomProvider, useIntercom } from 'react-use-intercom';
@@ -227,7 +234,7 @@ All the Intercom default attributes/props are camel cased (`appId` instead of `a
227234
Still want to pass custom attributes to Intercom? Whether `boot` or `update` is used, you can add your custom properties by passing these through `customAttributes` in the `boot` or `update` method.
228235

229236
**Remark** - the keys of the `customAttributes` object should be snake cased (this is how Intercom wants them). They are rawly passed to Intercom.
230-
```javascript
237+
```ts
231238
const { boot } = useIntercom();
232239

233240
boot({

packages/react-use-intercom/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@
2020

2121
## Installation
2222

23-
```
23+
```sh
24+
# pnpm
25+
pnpm add react-use-intercom
26+
27+
# npm
28+
npm install react-use-intercom
29+
30+
# yarn
2431
yarn add react-use-intercom
2532
```
2633

2734
## Quickstart
2835

29-
```js
36+
```ts
3037
import * as React from 'react';
3138

3239
import { IntercomProvider, useIntercom } from 'react-use-intercom';
@@ -86,7 +93,7 @@ Place the `IntercomProvider` as high as possible in your application. This will
8693
| autoBootProps | IntercomProps | Pass properties to `boot` method when `autoBoot` is `true` | false | |
8794

8895
#### Example
89-
```javascript
96+
```ts
9097
const App = () => {
9198
const [unreadMessagesCount, setUnreadMessagesCount] = React.useState(0);
9299

@@ -143,7 +150,7 @@ Used to retrieve all methods bundled with Intercom. These are based on the offic
143150
| showSpace | (spaceName: IntercomSpace) => void | Opens the Messenger with the specified space
144151

145152
#### Example
146-
```javascript
153+
```ts
147154
import * as React from 'react';
148155

149156
import { IntercomProvider, useIntercom } from 'react-use-intercom';
@@ -227,7 +234,7 @@ All the Intercom default attributes/props are camel cased (`appId` instead of `a
227234
Still want to pass custom attributes to Intercom? Whether `boot` or `update` is used, you can add your custom properties by passing these through `customAttributes` in the `boot` or `update` method.
228235

229236
**Remark** - the keys of the `customAttributes` object should be snake cased (this is how Intercom wants them). They are rawly passed to Intercom.
230-
```javascript
237+
```ts
231238
const { boot } = useIntercom();
232239

233240
boot({

0 commit comments

Comments
 (0)