Skip to content

Commit add70ad

Browse files
committed
implement AM feedback
1 parent e9fccc4 commit add70ad

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

examples/react-native/__tests__/js/app-services/use-app.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import {Credentials} from 'realm';
55
// :remove-start:
66
import {App} from 'realm';
77
import {AppProvider} from '@realm/react';
8-
import 'react-native';
98
import {render, fireEvent, waitFor} from '@testing-library/react-native';
109
import {View, Button} from 'react-native';
10+
1111
const APP_ID = 'example-testers-kvjdy';
12+
1213
function AppWrapper() {
1314
return (
1415
<View>

examples/react-native/__tests__/ts/app-services/app-provider.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import React from 'react';
33
import {AppProvider} from '@realm/react';
44
// :remove-start:
5-
import 'react-native';
65
import {render} from '@testing-library/react-native';
76
import {useApp} from '@realm/react';
87
import {View, Text} from 'react-native';
8+
99
const APP_ID = 'example-testers-kvjdy';
10+
1011
function MyApp() {
1112
const app = useApp();
1213
if (app.id !== APP_ID) {

examples/react-native/__tests__/ts/app-services/use-app.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import {Credentials} from 'realm';
55
// :remove-start:
66
import {App} from 'realm';
77
import {AppProvider} from '@realm/react';
8-
import 'react-native';
98
import {render, fireEvent, waitFor} from '@testing-library/react-native';
109
import {View, Button} from 'react-native';
10+
1111
const APP_ID = 'example-testers-kvjdy';
12+
1213
function AppWrapper() {
1314
return (
1415
<View>

source/sdk/react-native/app-services/connect-to-app-services-app.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,24 @@ Retrieve App Outside the App Provider
7171
-------------------------------------
7272

7373
To retrieve an instance of the App Client from anywhere in your application,
74-
call :js-sdk:`Realm.App.getApp() <Realm.App.html#getApp>` and pass in your ``App ID``.
74+
instantiate a new instance of :js-sdk:`Realm.App() <Realm.App.html>`
75+
from the ``realm`` package, then pass in your ``App ID``.
76+
7577

7678
.. tabs-realm-languages::
7779

7880
.. tab::
7981
:tabid: typescript
8082

8183
.. code-block:: typescript
84+
import Realm from "realm";
8285

8386
const app = new Realm.App("<Your App ID>");
8487

8588
.. tab::
8689
:tabid: javascript
8790

8891
.. code-block:: javascript
92+
import Realm from "realm";
8993

9094
const app = Realm.App.getApp("<Your App ID>");

0 commit comments

Comments
 (0)