4.0.0 • Published 1 year ago

fm-react-firebase v4.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React Firebase

The fastest and most efficient way to use Firebase in a React application

  • Fetch, add, and mutate Firestore data with zero boilerplate using provided useDoc and useCollection hooks

  • These Firestore hooks are built on top of SWR, meaning you get all of its awesome benefits out-of-the-box

  • Easily integrate Firebase Authentication into your app with zero boilerplate using the provided auth/render functions and useAuth hook

  • Authentication state is automatically handled and maintained for you using RxJS under the hood

Getting Started

Simply install the package along with it's peer dependencies

yarn add fm-react-firebase firebase swr

or

npm install fm-react-firebase firebase swr

Firestore Documents

Fetching a document is too easy with the useDoc hook

const { data } = useDoc("posts/some-doc-id");

You can also use the same hook to update the document

const { set } = useDoc("posts/some-doc-id");

const updateDoc = async () => {
    await set(dataToUpdate)
    alert('Document was updated!')
}

return (
    <button onClick={updateDoc}>Submit</submit>
)
3.0.0

1 year ago

4.0.0

1 year ago

2.15.0

1 year ago

2.14.0

1 year ago

2.11.0

1 year ago

2.12.0

1 year ago

2.10.0

1 year ago

2.4.0

1 year ago

2.7.0

1 year ago

2.6.0

1 year ago

2.9.0

1 year ago

2.8.0

1 year ago

2.13.0

1 year ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago