Skip to content

Remove key from image spread #14

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

believer
Copy link

@believer believer commented Feb 7, 2025

Currently, the key is spread onto FitImage. This works, but React doesn't like it and throws an error in development. We can instead move it as a direct prop and the errors go away.

Warning: A props object containing a "key" prop is being spread into JSX:
  let props = {key: someKey, indicator: ..., style: ..., source: ...};
  <FitImage {...props} />
React keys must be passed directly to JSX without using spread:
  let props = {indicator: ..., style: ..., source: ...};
  <FitImage key={someKey} {...props} />
    in Markdown (created by MarkdownText)

@ottob
Copy link

ottob commented Jun 26, 2025

Any chance of this getting merged?

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

Successfully merging this pull request may close these issues.

2 participants