Store hooks
This is the collection of store hooks within the ui-react
module. There are 64 store hooks in total.
useCreateMergeableStore
The useCreateMergeableStore
hook.
useCreateStore
The useCreateStore
hook is used to create a Store
within a React application with convenient memoization.
useProvideStore
The useProvideStore
hook is used to add a Store
object by Id
to a Provider
component, but imperatively from a component within it.
useStore
The useStore
hook is used to get a reference to a Store
from within a Provider
component context.
useStoreIds
The useStoreIds
hook is used to retrieve the Ids
of all the named Store
objects present in the current Provider
component context.
useStoreOrStoreById
The useStoreOrStoreById
hook is used to get a reference to a Store
object from within a Provider
component context, or have it passed directly to this hook.
useDelTablesCallback
The useDelTablesCallback
hook returns a callback that can be used to remove all of the tabular data in a Store
.
useHasTables
The useHasTables
hook returns a boolean indicating whether any Table
objects exist in the Store
, and registers a listener so that any changes to that result will cause a re-render.
useHasTablesListener
The useHasTablesListener
hook registers a listener function with the Store
that will be called when Tables
as a whole are added to or removed from the Store
.
useSetTablesCallback
The useSetTablesCallback
hook returns a parameterized callback that can be used to set the tabular data of a Store
.
useTables
The useTables
hook returns a Tables
object containing the tabular data of a Store
, and registers a listener so that any changes to that result will cause a re-render.
useTablesListener
The useTablesListener
hook registers a listener function with a Store
that will be called whenever tabular data in it changes.
useTableIds
The useTableIds
hook returns the Ids
of every Table
in a Store
, and registers a listener so that any changes to that result will cause a re-render.
useTableIdsListener
The useTableIdsListener
hook registers a listener function with a Store
that will be called whenever the Table
Ids
in it change.
useDelTableCallback
The useDelTableCallback
hook returns a parameterized callback that can be used to remove a single Table
from a Store
.
useHasTable
The useHasTable
hook returns a boolean indicating whether a given Table
exists in the Store
, and registers a listener so that any changes to that result will cause a re-render.
useHasTableCell
The useHasTableCell
hook returns a boolean indicating whether a given Cell
exists anywhere in a Table
, not just in a specific Row
, and registers a listener so that any changes to that result will cause a re-render.
useHasTableCellListener
The useHasTableCellListener
hook registers a listener function with the Store
that will be called when a Cell
is added to or removed from anywhere in a Table
as a whole.
useHasTableListener
The useHasTableListener
hook registers a listener function with the Store
that will be called when a Table
is added to or removed from the Store
.
useSetTableCallback
The useSetTableCallback
hook returns a parameterized callback that can be used to set the data of a single Table
in a Store
.
useTable
The useTable
hook returns an object containing the data of a single Table
in a Store
, and registers a listener so that any changes to that result will cause a re-render.
useTableCellIds
The useTableCellIds
hook returns the Ids
of every Cell
used across the whole Table
, and registers a listener so that any changes to that result will cause a re-render.
useTableCellIdsListener
The useTableCellIdsListener
hook registers a listener function with a Store
that will be called whenever the Cell
Ids
that appear anywhere in a Table
change.
useTableListener
The useTableListener
hook registers a listener function with a Store
that will be called whenever data in a Table
changes.
useRowIds
The useRowIds
hook returns the Ids
of every Row
in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useRowIdsListener
The useRowIdsListener
hook registers a listener function with a Store
that will be called whenever the Row
Ids
in a Table
change.
useSortedRowIds
The useSortedRowIds
hook returns the sorted (and optionally, paginated) Ids
of every Row
in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useSortedRowIdsListener
The useSortedRowIdsListener
hook registers a listener function with a Store
that will be called whenever sorted (and optionally, paginated) Row
Ids
in a Table
change.
useAddRowCallback
The useAddRowCallback
hook returns a parameterized callback that can be used to create a new Row
in a Store
.
useDelRowCallback
The useDelRowCallback
hook returns a parameterized callback that can be used to remove a single Row
from a Table
.
useHasRow
The useHasRow
hook returns a boolean indicating whether a given Row
exists in the Store
, and registers a listener so that any changes to that result will cause a re-render.
useHasRowListener
The useHasRowListener
hook registers a listener function with the Store
that will be called when a Row
is added to or removed from the Store
.
useRow
The useRow
hook returns an object containing the data of a single Row
in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useRowCount
The useRowCount
hook returns the count of the Row
objects in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useRowCountListener
The useRowCountListener
hook registers a listener function with a Store
that will be called whenever the count of the Row
objects in a Table
changes.
useRowListener
The useRowListener
hook registers a listener function with a Store
that will be called whenever data in a Row
changes.
useSetPartialRowCallback
The useSetPartialRowCallback
hook returns a parameterized callback that can be used to set partial data of a single Row
in the Store
, leaving other Cell
values unaffected.
useSetRowCallback
The useSetRowCallback
hook returns a parameterized callback that can be used to set the data of a single Row
in a Store
.
useCellIds
The useCellIds
hook returns the Ids
of every Cell
in a given Row
, in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useCellIdsListener
The useCellIdsListener
hook registers a listener function with a Store
that will be called whenever the Cell
Ids
in a Row
change.
useCell
The useCell
hook returns an object containing the value of a single Cell
in a given Row
, in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useCellListener
The useCellListener
hook registers a listener function with a Store
that will be called whenever data in a Cell
changes.
useDelCellCallback
The useDelCellCallback
hook returns a parameterized callback that can be used to remove a single Cell
from a Row
.
useHasCell
The useHasCell
hook returns a boolean indicating whether a given Cell
exists in a given Row
in a given Table
, and registers a listener so that any changes to that result will cause a re-render.
useHasCellListener
The useHasCellListener
hook registers a listener function with the Store
that will be called when a Cell
is added to or removed from the Store
.
useSetCellCallback
The useSetCellCallback
hook returns a parameterized callback that can be used to set the value of a single Cell
in a Store
.
useDelValuesCallback
The useDelValuesCallback
hook returns a callback that can be used to remove all of the keyed value data in a Store
.
useHasValues
The useHasValues
hook returns a boolean indicating whether any Values
exist in the Store
, and registers a listener so that any changes to that result will cause a re-render.
useHasValuesListener
The useHasValuesListener
hook registers a listener function with the Store
that will be called when Values
as a whole are added to or removed from the Store
.
useSetPartialValuesCallback
The useSetPartialValuesCallback
hook returns a parameterized callback that can be used to set partial Values
data in the Store
, leaving other Values
unaffected.
useSetValuesCallback
The useSetValuesCallback
hook returns a parameterized callback that can be used to set the keyed value data of a Store
.
useValues
The useValues
hook returns a Values
object containing the keyed value data of a Store
, and registers a listener so that any changes to that result will cause a re-render.
useValuesListener
The useValuesListener
hook registers a listener function with a Store
that will be called whenever keyed value data in it changes.
useDelValueCallback
The useDelValueCallback
hook returns a parameterized callback that can be used to remove a single Value
from a Store
.
useHasValue
The useHasValue
hook returns a boolean indicating whether a given Value
exists in the Store
, and registers a listener so that any changes to that result will cause a re-render.
useHasValueListener
The useHasValueListener
hook registers a listener function with the Store
that will be called when a Value
is added to or removed from the Store
.
useSetValueCallback
The useSetValueCallback
hook returns a parameterized callback that can be used to set the data of a single Value
in a Store
.
useValue
The useValue
hook returns an object containing the data of a single Value
in a Store
, and registers a listener so that any changes to that result will cause a re-render.
useValueIds
The useValueIds
hook returns the Ids
of every Value
in a Store
, and registers a listener so that any changes to that result will cause a re-render.
useValueIdsListener
The useValueIdsListener
hook registers a listener function with a Store
that will be called whenever the Value
Ids
in it change.
useValueListener
The useValueListener
hook registers a listener function with a Store
that will be called whenever data in a Value
changes.
useDidFinishTransactionListener
The useDidFinishTransactionListener
hook registers a listener function with a Store
that will be called just after other non-mutating listeners are called at the end of the transaction.
useStartTransactionListener
The useStartTransactionListener
hook registers a listener function with the Store
that will be called at the start of a transaction.
useWillFinishTransactionListener
The useWillFinishTransactionListener
hook registers a listener function with a Store
that will be called just before other non-mutating listeners are called at the end of the transaction.