SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

[compiler] Don't show hint about ref-like naming if we infer another type (#34521)

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 [1bcdd224b10999138ef5aa1c1917b28d918e5421](https://github.com/facebook/react/commit/1bcdd224b10999138ef5aa1c1917b28d918e5421)
J
josephsavona committed
4ad8af040f50c7d059ed07b22b9f64210222efa2
Parent: e375e1e