Skip to content

A props object containing a "key" prop is being spread #47

Description

@haunkbn99

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-indicators@0.17.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-indicators/src/components/material-indicator/index.js b/node_modules/react-native-indicators/src/components/material-indicator/index.js
index bf7edc4..c3c5454 100644
--- a/node_modules/react-native-indicators/src/components/material-indicator/index.js
+++ b/node_modules/react-native-indicators/src/components/material-indicator/index.js
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
 import { View, Animated, Easing } from 'react-native';
 
 import Indicator from '../indicator';
-import styles from './styles';
+import styles from './styles.js';
 
 export default class MaterialIndicator extends PureComponent {
   static defaultProps = {
@@ -122,11 +122,12 @@ export default class MaterialIndicator extends PureComponent {
   };
 
   render() {
-    let { style, size: width, size: height, ...props } = this.props;
+    let { style, size: width, size: height, key, ...props } = this.props;
 
     return (
       <View style={[styles.container, style]}>
         <Indicator
+          key={key}
           style={{ width, height }}
           renderComponent={this._renderComponent}
           {...props}

This issue body was partially generated by patch-package.

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