Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove warnings? #41

Open
JiGewusuoweiju opened this issue Sep 2, 2024 · 1 comment
Open

How to remove warnings? #41

JiGewusuoweiju opened this issue Sep 2, 2024 · 1 comment

Comments

@JiGewusuoweiju
Copy link

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?

@al4iii
Copy link

al4iii commented Sep 3, 2024

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>
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants