mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Some components accept a union of a ref callback function or ref object.
In this case we may infer the type as a function due to the presence of
invoking the ref callback function. In that case, we currently report a
"Hint: name `fooRef` as "ref" or with a "-Ref" suffix..." even though
the variable is already named appropriately — the problem is that we
inferred a non-ref type. So here we check the type and don't report this
hint if we inferred another type.
DiffTrain build for [1bcdd224b1](https://github.com/facebook/react/commit/1bcdd224b10999138ef5aa1c1917b28d918e5421)