4 ms·
Most of the time I don't feel like performance is an issue as long as all your components use PureRenderMixin. Unless it takes over 20-30ms to render, the diffe
by ht85 10y ago
Most of the time I don't feel like performance is an issue as long as all your components use PureRenderMixin. Unless it takes over 20-30ms to render, the difference is not noticeable.
The problem as others have said is that it pollutes history, and that it is very CPU cycle hungry, bad for anything running on battery.
Nowadays I tend to use onBlur instead. There are two scenarios:
1) The form is the only source of change for the data. In this case just update the global state onBlur.
2) Other things affect the form value, so you need controlled input. In this case, onChange updates the local state. onBlur updates the global state and set the local state to null. Use `<input value={localStateValue !== null ? localStateValue : globalStateValue}/>`