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

"key" prop error whenever Awesome Button is used. #143

Open
CytrusGallium opened this issue May 1, 2023 · 2 comments
Open

"key" prop error whenever Awesome Button is used. #143

CytrusGallium opened this issue May 1, 2023 · 2 comments

Comments

@CytrusGallium
Copy link

Hello ! Since the last update I have been getting the following error in my react app :

Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
at span
at span
at button
at components_AwesomeButton

I tried fixing the problem by myself, but I wasn't able to run the development server :(

The error is not a big deal, the buttons works fine, but the error showing up in the console is frustrating and takes up some space, it would be Awesome if you can fix it.

Thanks for your time :)

@kanin-kearpimy
Copy link

Hi Can you provide more context such as the screen or code that you implement?

Your mentioned error occur, perhaps, of forgetting to add "key" attribute to any rendering component.
React wants unique identification for components.

See more here

@CytrusGallium
Copy link
Author

CytrusGallium commented May 7, 2023

Thank you for your interest :) but the problem started appearing after the last update, as you can see my awesome button is alone, not part of a map function or an enumeration.

Assigning the key attribute like you mentioned does not seem to fix the problem.

I usually make components and I don't have to assign key or ref for my components to work correctly, unless they are being mapped.

I'm pretty sure the problem happens inside Awesome Button.

Edit : the blue button is not an Awesome Button, the dark one in the buttom is an Awesome Button.

Please let me know If you are getting the same error If you use Awesome button ? I tried it in two apps, same problem.

image

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