A JSX ref is given as a plain name in quotes, which current React ignores

tx0/ts:legacy-ref-namerecommendedwarningbug

What it finds

<input ref="name" /> with this.refs.name: string refs were deprecated for years and are removed in React 19, where the ref is never set. useRef, createRef or a callback ref work in all versions.

Reported are ref attributes whose value is a string literal.

From the rule's source, legacy_ref_name.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:legacy-ref-name" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:legacy-ref-name] reason="..."

tx0 explain tx0/ts:legacy-ref-name shows the same in the terminal. Found a false positive? Report it.