Restore old behavior for empty `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.
S
Sebastian Silbermann committed
f3ce87ab650f07774e1df9bc3f8033e023973d10
Parent: af7e8c7
Committed by GitHub <[email protected]>
on 1/30/2024, 11:43:40 PM