React DOM
Callback ref
Attach through a function; changing callback identity can trigger cleanup and reattachment.
Formal Syntax & Structure
react syntaxreact
ref={node => { /* handle attachment */ }}Working Example
Example Snippetreact
function track(node) { input.current = node; }