Skip to content

Allow generic type argument for ResourceList items #543

@lemonmade

Description

@lemonmade

Feature request summary

ResourceList should support a type argument for the type of items that would allow better type safety through all the item-taking functions. This is now possible in TypeScript:

const items: string[];
<ResourceList
  items={items}
  renderItem((item) => /* inferred as string */ item}
/>

Rationale

Type safety is good :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions