mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fb5983331a75c29ae8e2bf07582938e1cb1c97d8
href props on anchor tags (#28124)
Treat `<a href="" />` the same with and without `enableFilterEmptyStringAttributesDOM` in https://github.com/facebook/react/pull/18513 we started to warn and ignore for empty `href` and `src` props since it usually hinted at a mistake. However, for anchor tags there's a valid use case since `<a href=""></a>` will by spec render a link to the current page. It could be used to reload the page without having to rely on browser affordances. The implementation for Fizz is in the spirit of https://github.com/facebook/react/pull/21153. I gated the fork behind the flag so that the fork is DCE'd when the flag is off. DiffTrain build for commit https://github.com/facebook/react/commit/f3ce87ab650f07774e1df9bc3f8033e023973d10.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%