Skip to content

Bug: React keys must be passed directly to JSX in MaterialIndicator#43

Description

@Haco11

Hi! 馃憢

Thank you for your work on this project! 馃槉

I encountered a React warning when using MaterialIndicator from react-native-indicators@0.17.0:

Warning: A props object containing a "key" prop is being spread into JSX:
<Animated(View) {...props} />
React keys must be passed directly to JSX without using spread:
<Animated(View) key={someKey} {...props} />

Proposed Fix
Pass the key prop directly to Animated.View. Here's the diff:

<Animated.View style={styles.layer} {...{ key: index }}>

  • <Animated.View style={styles.layer} key={index}>
    This resolves the issue without changing component behavior.

Thank you for reviewing! Let me know if more details are needed. 馃槉

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