Comments (10)
I mean the warning. It warns when previously it didn't complain. I think this would count as a breaking change. It renders fine in both cases, so the warning isn't needed.
from react.
I wish there was a way to feature-detect for it though. A warning is fine for end users, but those of us building libraries will need to support both. Granted, there probably aren't many libraries that need to set that particular prop (and with vercel/next.js#65235 and ascorbic/unpic-img#644 those are probably most covered), but checking for the existence of use
isn't a great solution.
from react.
It doesn't count as a breaking change, since we don't consider DEV warnings as breaking changes in our development policy: https://react.dev/community/versioning-policy#what-counts-as-a-breaking-change
But we should probably make this a deprecation warning instead of the current text since it implies it doesn't work. Something like:
Warning In React 19,
fetchpriority
has been renamed tofetchPriority
. We will remove supportfetchpriority
in a future version. Please check the render method of<Foo>
.
What do you think @eps1lon?
from react.
In the repro, the fetchpriority
attribute is set for both cases. The warning targets different casings now. Is there some other behavior that changed?
from react.
Both should work correctly, with no warnings. fetchpriority
works in 18.2.0. Adding support for fetchPriority
shouldn't have broken the previously-supported casing, but seems to have done so.
from react.
With broken you mean the warning that changed or is there some other, end-user observable behavior that broke?
from react.
Are you planning to remove support? I'm not clear on the policy there: is the plan to only support DOM properties and not HTML attributes?
from react.
Mabye the "invalid" wording is a bit strong. We should just say it's renamed as @rickhanlonii suggests. But removing support would be a novel thing to do. We haven't done that for any other prop.
from react.
Is there any reason to not treat them as extra variants that are both supported (like Preact does), and not warn about either? One is the HTML attribute and the other is the DOM property and they both work.
from react.
It can get confusing with regards to object spreading and handling both casings. We'd have to add additional runtime logic to reconcile all casing variants.
Typechecking would also have to support both casings and would no longer flag if you specify both properties.
from react.
Related Issues (20)
- [React 19] `eslint-plugin-react-compiler` throws SyntaxErrors when it encounters `.json` or `.graphql` files HOT 2
- parsePluginOptions lowercasing breaks runtimeModule option HOT 1
- [React 19] Support React Compiler with older React versions for libraries HOT 1
- [React 19] React compiler strips `await` from `for await` loops HOT 2
- [React Compiler] React Fast Refresh Compatibility Issue
- Bug: The Warning 'Each child in a list should have a unique "key" prop.' Should Provide the Duplicate Key
- Bug: Inefficiency when hooks return multiple values HOT 3
- [React 19]We need a feature like Vue's Keep-alive. Because this is often a basic requirement when developing SI. I really wish this was available by default with self-support.
- Bug: React Compiler should not encode in JSX prop value HOT 4
- findDOMNode has been deprecated and removed from react-dom in the latest versions, including the React 19.0.0 beta. HOT 2
- Bug: startTransition gets stuck on infinite Suspense HOT 2
- React compiler requires that expressions referenced in handler code are always resolvable HOT 1
- 2024 谷歌蜘蛛池出租:谷歌蜘蛛池出租厂家
- `react-compiler-healthcheck` prints "StrictMode usage not found." in Next.js project with `reactStrictMode: true` in `next.config.js`
- [React 19] react compiler warns about mutating ref in specific case
- [React 19] react-compiler warns when mutating globals inside useCallback
- [React 19] `transformOrigin` is Missing From Type `SVGAttributes`.
- React compiler healthcheck (and ESLint plugin) ignores all files if a babel.config.js file is present HOT 8
- react-compiler transformed conditional useCallback call incorrectly HOT 9
- Bug: Cannot run compiler playground locally HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.