DEV Community

Discussion on: I am the author of Elm in Action. Ask Me Anything!

Collapse
 
pruett profile image
Kevin Pruett

Hm, interested in hearing more about the issue with value and how it's affected with requestAnimationFrame batching. Is that to say if a text field isn't "bound" to the model with key presses, relying on the DOM to keep state, there will be inconsistencies?

Thread Thread
 
rtfeldman profile image
Richard Feldman

Right - if you use defaultValue to let the DOM's version of reality "take precedence" and use onInput to listen for changes, it's all good.

Unless you actually need to manually override that value! Then it's a pain. 🙂