Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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