badgateway/react-ketting

Typing of useCollection generic should allow different types for collection resource and collection item resources

mantycore opened this issue · 0 comments

Currently, useCollection hook generic uses the same Resource type for resource and items fields. This seems not right, because in most cases, these will be completely different types. The collection type can be empty or e.g. contain (as in our use case) information about pagination; the item type will contain the data fields for the individual items. Or am I missing something?