JedWatson / react-input-autosize

Auto-resizing input field for React
https://jedwatson.github.io/react-input-autosize
MIT License
769 stars 178 forks source link

`inputRef` --> `innerRef` #130

Closed jossmac closed 4 years ago

jossmac commented 6 years ago

Update prop name and add deprecation warning, so this is safe to patch.

Resolves #129

JedWatson commented 6 years ago

So... I'm not sure about this.

I know we're trying to match conventions, but this actually behaves differently; the outer component (the div) would normally be what innerRef refers to, as it's for transparently proving a ref not for the React component, but the DOM component it renders.

In this case, we're applying the inputRef to the innermost DOM component, the <input>...

I could be convinced, it just bothers me that this behaves differently to all the other implementations of innerRef I've seen, so I kind of like being explicit about it being the inputRef.