useDataLength

Hook that returns the number of records loaded in a data object

Returns the number of records currently loaded in the data object.

Example

import { useDataLength } from "@olenbetong/appframe-react";

function MyComponent() {
  let count = useDataLength(dsMyDataObject);

  return <p>{count} items available.</p>;
}

API

export declare function useDataLength(dataObject: DataObject<any>): number;

Last updated

Was this helpful?