In #54 we added a ref prop type, and in #55 added an arity check for callback refs. Unfortunately, that breaks a common pattern of having an empty function as a default value. For example:
We could leave the arity check and change default values to undefined, instead. However, that's an unknown amount of work, and I think we're better off removing the arity check and accepting functions with any number of arguments.
In #54 we added a ref prop type, and in #55 added an arity check for callback refs. Unfortunately, that breaks a common pattern of having an empty function as a default value. For example:
We could leave the arity check and change default values to
undefined
, instead. However, that's an unknown amount of work, and I think we're better off removing the arity check and accepting functions with any number of arguments.@ljharb , what do you think?