Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.ui

Avoid ReactDOM.findDOMNode

`findDOMNode` reaches through component boundaries with a deprecated escape hatch that breaks strict mode migrations.

#Metadata

Rule ID
ts.react.no-find-dom-node
Severity
medium
Confidence
0.8
Languages
javascript, typescript
Presets
strict
Stability
experimental
Applies to
function
Tags
react, rules-catalog, ui

#Why it matters

Direct DOM lookups make React trees harder to refactor and fail to model multi-node or fragment-based rendering safely.

#Remediation

Attach a ref directly to the rendered element, or forward refs through component boundaries instead of reading DOM nodes imperatively.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.react.no-find-dom-node.rule.yaml.