We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c90e630 + 09c123b commit 1d1ca28Copy full SHA for 1d1ca28
database/README.md
@@ -136,14 +136,14 @@ Returns:
136
import { useObject } from 'react-firebase-hooks/database';
137
138
const DatabaseValue = () => {
139
- const [value, loading, error] = useObject(firebase.database().ref('value'));
+ const [snapshot, loading, error] = useObject(firebase.database().ref('value'));
140
141
return (
142
<div>
143
<p>
144
{error && <strong>Error: {error}</strong>}
145
{loading && <span>Value: Loading...</span>}
146
- {value && <span>Value: {value.val()}</span>}
+ {snapshot && <span>Value: {snapshot.val()}</span>}
147
</p>
148
</div>
149
);
0 commit comments