Skip to content

Commit 8d94015

Browse files
authored
Update README.md
1 parent d5f9bdd commit 8d94015

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ document.body?.addEventListener('click', () => {
5353
})
5454
```
5555

56-
### using `React` (Simple / client-side only)
56+
### using `React` (Simple)
5757

5858
```tsx
5959
import { AnalyticsBrowser } from '@segment/analytics-next'
@@ -71,6 +71,8 @@ const App = () => (
7171
### using `React` (Advanced w/ React Context)
7272

7373
```tsx
74+
import { AnalyticsBrowser } from '@segment/analytics-next'
75+
7476
const AnalyticsContext = React.createContext<AnalyticsBrowser>(undefined!);
7577

7678
type Props = {
@@ -200,7 +202,10 @@ First, clone the repo and then startup our local dev environment:
200202
```sh
201203
$ git clone git@github.com:segmentio/analytics-next.git
202204
$ cd analytics-next
203-
$ yarn dev
205+
$ nvm use # installs correct version of node defined in .nvmrc.
206+
$ yarn && yarn build
207+
$ yarn test
208+
$ yarn dev # optional: runs analytics-next playground.
204209
```
205210

206211
> If you get "Cannot find module '@segment/analytics-next' or its corresponding type declarations.ts(2307)" (in VSCode), you may have to "cmd+shift+p -> "TypeScript: Restart TS server"

0 commit comments

Comments
 (0)