mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
f3ce87ab65
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.