4.2.3 • Published 9 months ago

reactfire v4.2.3

Weekly downloads
3,377
License
MIT
Repository
github
Last release
9 months ago

Reactfire Build Status

Hooks that make it easy to interact with Firestore, Realtime Database, Authentication, and Storage. Note, every reactfire hook throws a Promise until it has connected to Firebase. Wrap your components in React's Suspense, or, if you don't want to deal with Suspense, pass an initial value to a reactfire hook. Example.

Interfaces

AuthCheckProps

PropertyType
authAuth
childrenReact.Component
fallbackReact.Component
requiredClaimsObject

SuspensePerfProps

PropertyType
childrenReact.Component
fallbackReact.Component
firePerfany
traceIdstring

ReactFireOptions

PropertyType
startWithValueany

Components

AuthCheck

Props

interface AuthCheckProps

Returns

React.FunctionComponent

SuspenseWithPerf

Props

interface SuspensePerfProps

Returns

React.FunctionComponent

Hooks

useDatabaseList

Subscribe to a Realtime Database list

Parameters

ParameterType
refReference or Query
options ?ReactFireOptions

Returns

QueryChange[]

useDatabaseObject

Subscribe to a Realtime Database object

Parameters

ParameterType
refReference
options ?ReactFireOptions

Returns

QueryChange

useFirestoreCollection

Subscribe to a Firestore collection

Parameters

ParameterType
refCollectionReference
options ?ReactFireOptions

Returns

QuerySnapshot

useFirestoreDoc

Suscribe to Firestore Document changes

Parameters

ParameterType
refDocumentReference
options ?ReactFireOptions

Returns

DocumentSnapshot

useStorageDownloadURL

Subscribe to a storage ref's download URL

Parameters

ParameterType
refReference
options ?ReactFireOptions

Returns

string

useStorageTask

Subscribe to the progress of a storage task

Parameters

ParameterType
taskUploadTask
refReference
options ?ReactFireOptions

Returns

UploadTaskSnapshot

useUser

Subscribe to Firebase auth state changes, including token refresh

Parameters

ParameterType
authAuth
options ?ReactFireOptions

Returns

User

useObservable

Parameters

ParameterType
observable\$Observable
observableIdstring
startWithValue ?any

Returns

any

For development

  1. yarn install
  2. cd into the reactfire/reactfire directory. run yarn run watch.
  3. In a new terminal, cd into the reactfire/sample-simple directory. run yarn start.
  4. Head over to https://localhost:3000 to see the running sample

Testing

  1. cd into the reactfire/reactfire directory
  2. run yarn test
4.2.3-exp.9429194

9 months ago

4.2.3-exp.a1d5930

9 months ago

4.2.3-exp.1769cfb

10 months ago

4.2.3-exp.3f13a86

10 months ago

4.2.3-exp.8d83c9e

10 months ago

4.2.3

10 months ago

4.2.3-exp.85cb2bb

9 months ago

4.2.3-exp.c7357da

9 months ago

4.2.3-exp.4329c43

10 months ago

4.2.3-exp.9801ee9

9 months ago

4.2.2

2 years ago

4.2.1

2 years ago

4.2.0

3 years ago

4.1.1

3 years ago

4.0.1

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

4.0.0-rc.1

3 years ago

4.0.0-rc.2

3 years ago

3.0.0-rc.3

3 years ago

3.0.0-rc.2

3 years ago

3.0.0-rc.1

3 years ago

3.0.0-rc.0

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0-rc.3

4 years ago

2.0.0-rc.2

4 years ago

2.0.0-rc.1

4 years ago

2.0.0-rc.0

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0

5 years ago

2.0.0-alpha.2

5 years ago

2.0.0-alpha.1

5 years ago

1.0.0

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago