Skip to content

Commit c1fee6c

Browse files
authored
Merge pull request #697 from BulbasDanil/main
docs: fix incorrect package name from @mentraos/react to @mentra/react
2 parents 02b720d + 4ccdca8 commit c1fee6c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mentraos_docs/docs/react-webviews.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# React Webviews
22

3-
The [`@mentraos/react`](https://www.npmjs.com/package/@mentraos/react) library simplifies building React-based webviews that integrate seamlessly with MentraOS authentication. When users open your webview through the MentraOS manager app, they are automatically authenticated without requiring a separate login process.
3+
The [`@mentra/react`](https://www.npmjs.com/package/@mentra/react) library simplifies building React-based webviews that integrate seamlessly with MentraOS authentication. When users open your webview through the MentraOS manager app, they are automatically authenticated without requiring a separate login process.
44

55
## What Are React Webviews?
66

@@ -11,7 +11,7 @@ React webviews are web applications built with React that run inside the MentraO
1111
- **Content Management**: Create, edit, and organize user content
1212
- **Dashboard Interfaces**: Show personalized information and controls
1313

14-
The `@mentraos/react` library handles all the authentication complexity, automatically extracting and verifying user tokens from the MentraOS system.
14+
The `@mentra/react` library handles all the authentication complexity, automatically extracting and verifying user tokens from the MentraOS system.
1515

1616
## Complete Example
1717

@@ -22,11 +22,11 @@ There's a complete example of a React webview in the [`MentraOS-React-Example-Ap
2222
Install the React authentication library in your webview project:
2323

2424
```bash
25-
npm install @mentraos/react
25+
npm install @mentra/react
2626
# or
27-
yarn add @mentraos/react
27+
yarn add @mentra/react
2828
# or
29-
bun add @mentraos/react
29+
bun add @mentra/react
3030
```
3131

3232
## Prerequisites
@@ -46,7 +46,7 @@ The `MentraAuthProvider` component manages authentication state for your entire
4646
import React from 'react';
4747
import ReactDOM from 'react-dom/client';
4848
import App from './App';
49-
import { MentraAuthProvider } from '@mentraos/react';
49+
import { MentraAuthProvider } from '@mentra/react';
5050

5151
/**
5252
* Application entry point that provides MentraOS authentication context
@@ -68,7 +68,7 @@ Use the `UseMentraAuth` hook to access user information and authentication statu
6868
```tsx
6969
// src/components/UserProfile.tsx
7070
import React from 'react';
71-
import { UseMentraAuth } from '@mentraos/react';
71+
import { UseMentraAuth } from '@mentra/react';
7272

7373
/**
7474
* Component that displays user authentication status and profile information.
@@ -123,7 +123,7 @@ Here's a comprehensive example that demonstrates authentication, API calls, and
123123
*/
124124

125125
import React, { useState } from 'react';
126-
import { MentraAuthProvider, UseMentraAuth } from '@mentraos/react';
126+
import { MentraAuthProvider, UseMentraAuth } from '@mentra/react';
127127

128128
/**
129129
* Type definition for the API response from the notes endpoint
@@ -422,7 +422,7 @@ app.use(cors({
422422

423423
**"Token validation failed"**
424424
- Verify the device clock is synchronized (token expiration is time-sensitive)
425-
- Check that you're using the latest version of `@mentraos/react`
425+
- Check that you're using the latest version of `@mentra/react`
426426
- Ensure the MentraOS manager app is up to date
427427

428428
**Backend authentication fails**

0 commit comments

Comments
 (0)