1.1.1 • Published 4 years ago

use-firebase-v2 v1.1.1

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

use-firebase-v2

Simple hook for react-firebase

Install

npm i use-firebase-v2

Example

// Import the package
import useFirebase from 'use-firebase-v2';

const myComponent = () => {

  // Create a doc ref
  const docRef = firebase.firestore().collection('myCollection').doc('myDoc');

  // use the hook
  const value = useFirebase(docRef);

  return(
    <p>Hello, {value && value.name}</p>
  )
}
1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago