Files
react/fixtures/attribute-behavior
Sebastian Silbermann f3ce87ab65 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.
2024-01-31 00:43:40 +01:00
..

Attribute Behavior Fixture

WIP: This is an MVP, still needs polish.

Known Issues

  • There are currently two errors thrown when the page loads; SyntaxError: missing ; before statement

Instructions

yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn dev

Interpretation

Each row is an attribute which could be set on some DOM component. Some of them are invalid or mis-capitalized or mixed up versions of real ones. Each column is a value which can be passed to that attribute. Every cell has a box on the left and a box on the right. The left box shows the property (or attribute) assigned by the latest stable release of React, and the right box shows the property (or attribute) assigned by the locally built version of React.

Right now, we use a purple outline to call out cases where the assigned property (or attribute) has changed between React 15 and 16.


This project was bootstrapped with Create React App.

You can find the guide for how to do things in a CRA here.