Skip to content

Commit 2182139

Browse files
committed
fix quickstart
1 parent 4e7a12f commit 2182139

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Listen for realtime changes in a Firestore document with Reactfire. We'll use [`
2727
1. Install reactfire and the Firebase SDK
2828

2929
```shell
30-
npm i firebase reactfire
30+
npm i firebase reactfire@canary
3131
```
3232

3333
1. Create a world-readable document in Firestore.
@@ -43,7 +43,6 @@ Listen for realtime changes in a Firestore document with Reactfire. We'll use [`
4343
```js
4444
//...
4545
import { FirebaseAppProvider } from 'reactfire';
46-
import * as firebase from 'firebase/app';
4746
import 'firebase/performance';
4847
//...
4948
```
@@ -71,7 +70,7 @@ Listen for realtime changes in a Firestore document with Reactfire. We'll use [`
7170
```js
7271
//...
7372
import 'firebase/firestore';
74-
import { UseFirestoreDoc } from 'reactfire';
73+
import { useFirestoreDoc, useFirebaseApp } from 'reactfire';
7574
//...
7675
```
7776

@@ -100,17 +99,18 @@ Listen for realtime changes in a Firestore document with Reactfire. We'll use [`
10099

101100
1. Render your component inside of a `Suspense` tag
102101

103-
We need to do this because `useFirestoreDoc` throws a Promise while it is waiting for a response from Firestore. Suspense will catch the Promise and render `fallback` until the Promise is resolved.
102+
> We need to do this because `useFirestoreDoc` throws a Promise while it is waiting for a response from Firestore. Suspense will catch the Promise and render `fallback` until the Promise is resolved.
103+
104+
Replace the `App` function with the following:
104105

105106
```jsx
106107
//...
107108
function App() {
108109
return (
109110
<div className="App">
110-
<header className="App-header">{/* ... */}</header>
111-
<Suspense fallback={'loading burrito status...'}>
111+
<React.Suspense fallback={'loading burrito status...'}>
112112
<Burrito />
113-
</Suspense>
113+
</React.Suspense>
114114
</div>
115115
);
116116
}

0 commit comments

Comments
 (0)