no-find-dom-node
Configuration
rslint.config.ts
Disallow usage of findDOMNode.
Facebook will eventually deprecate findDOMNode as it blocks certain
improvements in React in the future. It is recommended to use callback refs
instead.
Rule Details
This rule flags any call whose callee is the identifier findDOMNode (bare
call) or a member-access whose property name is findDOMNode
(React.findDOMNode(...), ReactDOM.findDOMNode(...), etc.). Computed
(bracket) access such as React['findDOMNode'](...) is intentionally not
flagged — this mirrors the upstream rule's AST check.
Examples of incorrect code for this rule:
Examples of correct code for this rule: