Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm getting this error, when I pass key as a prop
Screenshot 2023-09-11 at 18 01 55

And actually, looking for the arguments that <Tooltip /> accepts, I don't see a key prop there:
Screenshot 2023-09-11 at 18 00 59

You must be logged in to vote

Hi Ricardo. Unfortunately there's not enough information here to be able to help you for sure.

As you've noticed, the tooltip component indeed does not have an explicit key prop, but since it is a functional component, the key prop is implicit. Here's an example from the official React docs.

From the error message, it seems like you're defining a wrapper component for the tooltip on your components13/Tooltip.ts file.

My guess is that, as the error message suggests, you're trying to expose the key prop, which is not allowed. If that's not the case, please provide more information.

Replies: 1 comment · 1 reply

Comment options

Hi Ricardo. Unfortunately there's not enough information here to be able to help you for sure.

As you've noticed, the tooltip component indeed does not have an explicit key prop, but since it is a functional component, the key prop is implicit. Here's an example from the official React docs.

From the error message, it seems like you're defining a wrapper component for the tooltip on your components13/Tooltip.ts file.

My guess is that, as the error message suggests, you're trying to expose the key prop, which is not allowed. If that's not the case, please provide more information.

You must be logged in to vote
1 reply
@ricardo-fnd
Comment options

That is the case, yes. I shouldn't accept key prop, as you said, its implicit for react components. thank you so much for the help

Answer selected by ricardo-fnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.