Description
In the past people have requested access to the event object in order to pull properties from it (#57), and the proposed solution is both inadequate. For example, if I want to do something with e.target.parentElement and that parent element is dynamic, I have to do something brittle that breaks with the react way, and some data is simply lost forever without doing something really hacky like adding an additional event listener.
Currently if I need the target element, I'll have to do something like this as a one off?
onChange={newValue => props.doAction(newValue, document.querySelector(".i-hope-this-is-event-target"))}
Even then, there are a lot more keys on the event object and having to manually derive them from elsewhere seems like a step backward.
The way it works natively is more flexible and much cleaner:
onChange={props.doAction}
If you wanted to append the slider value to the event object vs throwing away the event object and only returning the slider value, it would be a minor breaking change that could be resolved with destructuring in the parameters of the function definition, ie:
function doAction({sliderValue}) { //stuff that only requires the sliderValue }
Enhancing the event object seems like a more powerful pattern than making assumptions about use cases that are awkward to work around when the assumption is wrong. Was there some specific reasoning behind not returning the event object from on* events? If not, would you accept a pull request that changes this behavior?