Skip to content

Custom React Hook to access a Firebase Realtime Database Reference

License

Notifications You must be signed in to change notification settings

itsPeetah/useRTDBRef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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));
  }, []);

  // ...
}

About

Custom React Hook to access a Firebase Realtime Database Reference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published