Skip to content

IconRenderer prop type incompatible with @expo/vector-icons MaterialIcons #311

@MigenaaL

Description

@MigenaaL

Problem
SectionedMultiSelect's IconRenderer prop expects ReactNode, but MaterialIcons from @expo/vector-icons resolves to a generic Icon<...> type which is not assignable to ReactNode.

Type 'Icon<"label" | "search" | ... 2215 more ..., "material">' is not assignable to type 'ReactNode'.

Environment
react-native-sectioned-multi-select: latest
@expo/vector-icons: latest

TypeScript strict mode
Steps to Reproduce
Import MaterialIcons from @expo/vector-icons
Pass it to
TypeScript reports a type error on IconRenderer
Expected Behavior
IconRenderer should accept icon components from @expo/vector-icons without type errors since this is the most common usage pattern shown in the library's own README.

import { MaterialIcons } from "@expo/vector-icons";

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions