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

Bug: Warning: React does not recognize the fetchPriority prop on a DOM element [React 18.3.1] #28948

Closed
martabitbrain opened this issue Apr 29, 2024 · 3 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@martabitbrain
Copy link

React version: 18.3.1

This bug may be related to #28946 .

Steps To Reproduce

  1. Create an image tag with fetchPriority="high" attribute (camelCase)
  2. Create an image tag with fetchpriority="high" attribute (lowercase)

Link to code example: https://codesandbox.io/p/sandbox/quiet-haze-5hkscx

The current behavior

Output: (fetchpriority attribute looks ok!)

<img fetchpriority="high" src="https://dummyimage.com/200x64/b000b0/fff&text=fetchPriority">
<img fetchpriority="high" src="https://dummyimage.com/200x64/00b075/fff&text=fetchpriority">

Warning:

Warning: React does not recognize the `fetchPriority` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `fetchpriority` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

The expected behavior

The same output, but no warning.

@martabitbrain martabitbrain added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Apr 29, 2024
@martabitbrain martabitbrain changed the title Bug: Warning: React does not recognize the fetchPriority prop on a DOM element. Bug: Warning: React does not recognize the fetchPriority prop on a DOM element [React 18.3.1] Apr 29, 2024
@eps1lon
Copy link
Collaborator

eps1lon commented Apr 29, 2024

Duplicate of #27233. Fixed in Canary release channel and once React 19 becomes stable.

@eps1lon eps1lon closed this as completed Apr 29, 2024
@martabitbrain
Copy link
Author

Sorry, I didn't notice.

@MKSisti
Copy link

MKSisti commented Nov 7, 2024

it's Nov now and React 19 is still not stable sadly, can we get the fix rolled for 18.x.x @eps1lon 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

3 participants