@itspeetah/usertdbref
v1.0.1
Published
Custom react hook to access a Firebase Realtime Database reference
Downloads
6
Maintainers
Readme
useRTDBRef
Custom React Hook to access a Firebase Realtime Database Reference
Usage
import useRTDBRef from "@itspeetah/usertdbref"
import {useEffect} from react;
function MyComponent() {
const myRef = useRTDBRef(config, "reference/path/or/query");
useEffect(() => {
onValue(myRef, (data) => console.log("Received data!", data));
}, []);
// ...
}