Looks like string refs in React are highly discouraged and need to be replaces with .createRef or callback refs. Callback ref sounds better to me as at least i can see the way how it can be automaticall converted:
{
ref: 'el',
},
to
{
ref: (node) => this.__reactRefs['el'] = node,
}
And adding automatically this.__reactRefs = {} right after super() call in class constructor.
And just replacing this.refs access to this.__reactRefs
Looks like string refs in React are highly discouraged and need to be replaces with
.createRef
or callback refs. Callback ref sounds better to me as at least i can see the way how it can be automaticall converted:to
And adding automatically
this.__reactRefs = {}
right aftersuper()
call in class constructor.And just replacing
this.refs
access tothis.__reactRefs