Persister hooks
This is the collection of persister hooks within the ui-react
module. There are 6 persister hooks in total.
useCreatePersister
The useCreatePersister
hook is used to create a Persister
within a React application along with convenient memoization and callbacks.
usePersister
The usePersister
hook is used to get a reference to a Persister
object from within a Provider
component context.
usePersisterIds
The usePersisterIds
hook is used to retrieve the Ids
of all the named Persister
objects present in the current Provider
component context.
usePersisterOrPersisterById
The usePersisterOrPersisterById
hook is used to get a reference to a Persister
object from within a Provider
component context, or have it passed directly to this hook.
usePersisterStatus
The usePersisterStatus
hook returns a the status of a Persister
, and registers a listener so that any changes to it will cause a re-render.
usePersisterStatusListener
The usePersisterStatusListener
hook registers a listener function with the Persister
that will be called when its status changes.