Skip to content

Commit a76c360

Browse files
Update README.md
The error is an Object, the React app will crash because "Invariant Violation: Objects are not valid as a React child"
1 parent f27be47 commit a76c360

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firestore/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const FirestoreCollection = () => {
6666
return (
6767
<div>
6868
<p>
69-
{error && <strong>Error: {error}</strong>}
69+
{error && <strong>Error: {JSON.stringify(error)}</strong>}
7070
{loading && <span>Collection: Loading...</span>}
7171
{value && (
7272
<span>
@@ -182,7 +182,7 @@ const FirestoreDocument = () => {
182182
return (
183183
<div>
184184
<p>
185-
{error && <strong>Error: {error}</strong>}
185+
{error && <strong>Error: {JSON.stringify(error)}</strong>}
186186
{loading && <span>Document: Loading...</span>}
187187
{value && <span>Document: {JSON.stringify(value.data())}</span>}
188188
</p>

0 commit comments

Comments
 (0)