·
Last changedVersion:
This version passed the hardening gate. Hardening applied 2 targeted changes and preserved all other text. Classified findings before hardening: 0. Classified findings closed: 0. Classified findings remaining: 0. Unclassified scanner findings remaining: 0. Review findings closed: 2. Review findings remaining: 6.
None
None
Expand | File | Group | Subtype | Severity | Status |
|---|
No findings available
0 findings
String refs (ref="myInput" + this.refs.myInput) were deprecated in React 16.3, warn in React 18.3.1, and are removed in React 19.
| Pattern | Reference |
|---|---|
Single ref on a DOM element | |
Multiple refs in one component | |
Refs in a list / dynamic refs | |
Callback refs (alternative approach) | |
Ref passed to a child component |
Both should be migrated together - find the ref="name" and the this.refs.name accesses for each component as a pair.
Every string ref migrates to React.createRef():
refName = React.createRef(); as a class field (or in constructor)ref="refName" → ref={this.refName} in JSXthis.refs.refName → this.refName.currentRead references/patterns.md for the full before/after for each case.
Get started with chainctlchainctl skill install public/github/react18-string-refs:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.chainreg.biz/public/github.com/github/skills/react18-string-refs:latest
MIT
HARDENING.md
LICENSE
SKILL.md
references/patterns.md