useListChangeToken

useListChangeToken(
        list: string,
        options?: ListTokenOptions,
        deps?: any[]): IChangeTokenInfo | null | undefined;

Returns lists current change token and last modified dates.

Examples

Get list change tokens,

const changeDetails = useListChangeToken("5ee53613-bc0f-4b2a-9904-b21afd8431a7");

const changeDetails = useListChangeToken("My List Title");

Parameters

NameTypeDescriptionTracked for changes
liststringList UUID or titleYes
options?ListTokenOptionsuseListChangeToken hook optionsPartially
deps?DependencyListHook dependency list.Yes

Remarks

You can also use useList to get exact same change info.

const listInfo = useList("5ee53613-bc0f-4b2a-9904-b21afd8431a7", {
    query: {
        select: [
             "CurrentChangeToken",
             "LastItemDeletedDate",
             "LastItemModifiedDate",
             "LastItemUserModifiedDate" ]
    }
});