react-native-indicators icon indicating copy to clipboard operation
react-native-indicators copied to clipboard

How to remove warnings?

Open JiGewusuoweiju opened this issue 1 year ago • 1 comments

When using the UIActivityIndicator component, I found a warning about A props object containing a "key" prop is being spread into JSX: let props = {key: someKey, style: ..., children: ...}; <Animated(View) {...props} /> React keys must be passed directly to JSX without using spread:....

How do I remove the warning?

JiGewusuoweiju avatar Sep 02 '24 10:09 JiGewusuoweiju

When using the UIActivityIndicator component, I found a warning about A props object containing a "key" prop is being spread into JSX: let props = {key: someKey, style: ..., children: ...}; <Animated(View) {...props} /> React keys must be passed directly to JSX without using spread:....

How do I remove the warning?

\node_modules\react-native-indicators\src\components\material-indicator\index.js you need change start 110 line

    return (
      <Animated.View style={styles.layer} key={index}>
        <Animated.View style={layerStyle}>
          <Animated.View style={[containerStyle, offsetStyle]} collapsable={false}>
            <Animated.View style={viewportStyle}>
              <Animated.View style={containerStyle} collapsable={false}>
                <Animated.View style={lineStyle} />
              </Animated.View>
            </Animated.View>
          </Animated.View>
        </Animated.View>
      </Animated.View>
    );

al4iii avatar Sep 03 '24 14:09 al4iii