Skip to content

Commit 679e48c

Browse files
committed
readme formatting
1 parent 190f170 commit 679e48c

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ Use the `$` as much as you want - it will only result in one Firebase read reque
8080
Or better yet, use the built in `Doc` and `Collection` components. See below.
8181

8282

83-
## Examples
83+
## Stores
84+
85+
Stores are the building blocks of SvelteFire.
8486

8587
### Auth Store
8688

@@ -100,7 +102,7 @@ Listen to the current user. Render UI conditionally based on the auth state:
100102
{/if}
101103
```
102104

103-
## Firestore Stores
105+
### Firestore Stores
104106

105107
Subscribe to realtime data. The store will unsubscribe automatically to avoid unnecessary Firestore reads.
106108

@@ -164,12 +166,11 @@ Technically optional, this component puts Firebase into Svelte context. This avo
164166
<!-- other sveltefire components here -->
165167
166168
</FirebaseApp>
167-
168-
<!-- components outside context require the auth or firestore prop -->
169-
<User auth={auth} let:user></User>
170169
```
171170

172-
### User
171+
Note: Components outside a FirebaseApp will need the auth/firestore prop, i.e `<User auth={auth}>`
172+
173+
#### User
173174

174175
Get the current user.
175176

@@ -255,7 +256,7 @@ For complex queries that required dynamic data, it can be useful to build the qu
255256
<Collection ref={buildQuery(user.uid)} />
256257
</User>
257258
```
258-
### Putting it all Totgether
259+
### Using Components Together
259260

260261
These components can be combined to build complex realtime apps. It's especially powerful when fetching data that requires the current user's UID or a related document's path.
261262

@@ -290,9 +291,7 @@ These components can be combined to build complex realtime apps. It's especially
290291
```
291292

292293

293-
294-
295-
# Notes
294+
## Notes
296295

297296
- This library should only run the the client, it is not for server-side data fetching.
298297
- Requires Firebase v9 or greater.

0 commit comments

Comments
 (0)