findDOMNode reaches into a component for its DOM node, which React has removed
What it finds
findDOMNode breaks the boundary of a component, only finds its first node, and does not work in strict mode; React 19 removed it. A ref on the element gives the node.
Reported are calls of findDOMNode, alone or as a member of ReactDOM.
From the rule's source, find_dom_node_call.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:
[rules]
"tx0/ts:find-dom-node-call" = "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:find-dom-node-call] reason="..."tx0 explain tx0/ts:find-dom-node-call shows the same in the terminal. Found a false positive? Report it.