TinyBase

Store hooks

This is the collection of store hooks within the ui-react module. There are 26 store hooks in total.

useCreateStore

The useCreateStore hook is used to create a Store within a React application with convenient memoization.

useStore

The useStore hook is used to get a reference to a Store from within a Provider component context.

useDelTablesCallback

The useDelTablesCallback hook returns a callback that can be used to remove all of the data in a Store.

useSetTablesCallback

The useSetTablesCallback hook returns a parameterized callback that can be used to set the entire data of a Store.

useTables

The useTables hook returns a Tables object containing the entire 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 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. forward A Provider component is used to wrap part of an application in a context, and it can contain a default Store or a set of Store objects named by Id. The useTableIds hook lets you indicate which Store to get data for: omit the optional parameter for the default context Store, provide an Id for a named context Store, or provide a Store explicitly by reference.

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 callback that can be used to remove a single Table from a Store.

useSetTableCallback

The useSetTableCallback hook returns a parameterized callback that can be used to set the entire data of a single Table in a Store.

useTable

The useTable hook returns an object containing the entire data of a single Table in a Store, and registers a listener so that any changes to that result will cause a re-render.

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.

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 callback that can be used to remove a single Row from a Table.

useRow

The useRow hook returns an object containing the entire 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.

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 sets 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 entire 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 callback that can be used to remove a single Cell from a Row.

useSetCellCallback

The useSetCellCallback hook returns a parameterized callback that can be used to set the value of a single Cell in a Store.