Stop using pass-through refs and instead use forwardRef #14672
Labels
Help Wanted
Extra attention is needed
T-Epic
Issue is at Epic level
T-Task
Tasks for the team like planning
Why?
The forwardRef function is React’s standard way to expose DOM nodes from components to their parents. Using this spares us having to define custom reference parameters in property interfaces.
Reference: React docs: https://beta.reactjs.org/reference/react/forwardRef
What?
We’ll do away with any custom pass-through ref parameters such as inputRef or innerRef and replace them with forwardRef calls.
Plan
This can be split into tasks consisting of each component which accepts an
inputRef
orinnerRef
(name doesn't matter) ref pass-through - involves updating it to use forwardRef and updating all consumers of that Component to useref
.Tasks
Internal references
myhours: https://app.myhours.com/#/projects/1975122/overview
The text was updated successfully, but these errors were encountered: