@@ -59,24 +59,24 @@ Provider has different props you can use for configuration.
5959 The most common BaseConfiguration properties used are:
6060
6161 - ``schema?: (RealmObjectConstructor<AnyRealmObject> | ObjectSchema)[]``
62- Specifies all the object schemas in this Realm. Required when first creating a Realm.
63- If omitted, the schema will be read from the existing Realm file.
62+ Specifies all the object schemas in this Realm. Required when first creating a Realm.
63+ If omitted, the schema will be read from the existing Realm file.
6464
6565 - ``sync?: SyncConfiguration``
66- Configures a synced realm.
66+ Configures a synced realm.
6767
6868 ``RealmProvider`` has more props that define its behavior:
6969
7070 - ``fallback?: React.ComponentType<unknown> | React.ReactElement | null | undefined``
71- The fallback component to render while the Realm is opening.
71+ The fallback component to render while the Realm is opening.
7272
7373 - ``closeOnUnmount?: boolean``
74- Default is ``true``. If set to ``false``, realm will not close when the
75- component unmounts.
74+ Default is ``true``. If set to ``false``, realm will not close when the
75+ component unmounts.
7676
7777 - ``realmRef?: React.MutableRefObject<Realm | null>``
78- A ref to the realm instance. This is useful if you need to access the realm
79- instance outside of the scope of the realm.
78+ A ref to the realm instance. This is useful if you need to access the realm
79+ instance outside of the scope of the realm.
8080
8181 - ``children: React.ReactNode``
8282
@@ -89,14 +89,14 @@ Provider has different props you can use for configuration.
8989 The most common AppConfiguration property used is:
9090
9191 - ``id: string``
92- Specifies the App ID.
92+ Specifies the App ID.
9393
9494 .. tab:: UserProvider Props
9595 :tabid: user-provider-props
9696
9797 - ``fallback?: React.ComponentType<unknown> | React.ReactElement | null | undefined``
98- The fallback component to render if there is no authorized user. This can be
99- used to render a log in screen or otherwise handle authentication.
98+ The fallback component to render if there is no authorized user. This can be
99+ used to render a log in screen or otherwise handle authentication.
100100
101101Configure your Providers
102102~~~~~~~~~~~~~~~~~~~~~~~~
@@ -105,38 +105,36 @@ This section details how to configure and expose a single realm using a ``RealmP
105105imported directly from ``@realm/react``. For information about using ``createRealmContext()``
106106to configure a realm or exposing more than one realm, refer to their respective sections below.
107107
108- If you are developing an app using sync, you will need to use all three Providers. If you are
109- developing an app without sync, you only need to use ``RealmProvider``.
110-
111108.. tabs::
112109
113110 .. tab:: Configure realm with sync
114111 :tabid: configure-sync-realm
115112
113+ If you are developing an app using sync, you will need to use all three Providers.
114+
116115 By default, Realm syncs all data from the server before returning anything. If you want
117116 to sync data in the background, read Configure a Synced Realm While Offline [link].
118117
119118 To configure a synced realm:
120119
121- # . Import ``RealmProvider``, ``AppProvider``, and ``UserProvider`` from ``@realm/react``.
120+ 1 . Import ``RealmProvider``, ``AppProvider``, and ``UserProvider`` from ``@realm/react``.
122121
123- # . Configure ``AppProvider``.
124- Pass your App ID string to the ``id`` prop of the ``AppProvider``.
122+ 2 . Configure ``AppProvider``.
123+ a. Pass your App ID string to the ``id`` prop of the ``AppProvider``.
125124
126- #. Configure ``UserProvider`` and nest it within ``AppProvider``.
127-
128- Pass a component that logs a user in into the ``fallback`` prop. The app renders this component if there is no authenticated user.
125+ 3. Configure ``UserProvider`` and nest it within ``AppProvider``.
126+ a. Pass a component that logs a user in into the ``fallback`` prop. The app renders this component if there is no authenticated user.
129127
130- # . Configure ``RealmProvider`` for sync and nest it within ``UserProvider``.
128+ 4 . Configure ``RealmProvider`` for sync and nest it within ``UserProvider``.
131129
132- Pass your object models to the ``schema`` prop. (link out)
130+ a. Pass your object models to the ``schema`` prop. (link out)
133131
134- Pass your sync properties into the ``sync`` prop. Your sync properties are formatted like a json dictionary.
132+ b. Pass your sync properties into the ``sync`` prop. Your sync properties are formatted like a json dictionary.
135133
136- Add other Configuration object properties as props to ``RealmProvider``.
137-
138- You must set up a sync subscription. The example below uses an initial subscription,
139- but you can also set up subscriptions in ``RealmProvider`` child components.
134+ c. Add other Configuration object properties as props to ``RealmProvider``.
135+
136+ d. You must set up a sync subscription. The example below uses an initial subscription,
137+ but you can also set up subscriptions in ``RealmProvider`` child components.
140138
141139 .. include:: /includes/note-rn-multiple-app-clients-and-app-config-cache.rst
142140
@@ -150,6 +148,8 @@ developing an app without sync, you only need to use ``RealmProvider``.
150148 .. tab:: Configure realm without sync
151149 :tabid: configure-non-sync-realm
152150
151+ If you are developing an app without sync, you only need to use ``RealmProvider``.
152+
153153 To configure a non-synced realm:
154154
155155 #. Import ``RealmProvider`` from ``@realm/react``.
@@ -164,8 +164,8 @@ developing an app without sync, you only need to use ``RealmProvider``.
164164 [code example - unsynced]
165165
166166
167- Working in your Providers
168- -------------------------
167+ Working with Providers using Hooks
168+ ----------------------------------
169169
170170To use the Provider's context in your app's components, you can use hooks [link].
171171
0 commit comments