Skip to main content

Function: useCollectionService

Const useCollectionService<T, M, S, C>(dataSource, ctor, initialState): [S, C]

Type parameters

NameType
TT
Mextends ItemMetaItemMeta
Sextends CollectionState<T, M, S>CollectionState<T, M>
Cextends CollectionService<T, M, S, C>CollectionService<T, M, S>

Parameters

NameType
dataSourcestring | Collection<T, M> | T[]
ctorClass<C>
initialStateS

Returns

[S, C]

Defined in

onekijs/packages/onekijs-framework/src/collection/useCollectionService.ts:10