News for hackers. Stuff that matters.
Re:React: Another Level of Indirection by __--__ on Wednesday January 01, 2014 @05:13PM (#6996989)
Could you elaborate on that, please?
Re:React: Another Level of Indirection by chenglou on Wednesday January 01, 2014 @06:55PM (#6997383)
Input fields are typical DOM elements and are of course not overlooked. It's rather trivial to implement your own <MyTextArea /> component which keeps track of cursor position, etc. In fact, that's actually what React does. The <textarea /> component you use is actually a thin wrapper on top of the actual textarea (don't forget that the DOM is virtual in React so you get the luxury of these transparent wrappers).

This has serious implications. For one, the browser inconsistencies are taken care of for you, both for DOM elements and for events (which are also virtual). You effectively get cross-browser DOM tags/attributes/events/etc. without ever knowing it.

https://github.com/facebook/react/tree/master/src/dom/compon...

Re:React: Another Level of Indirection by __--__ on Thursday January 02, 2014 @04:17PM (#7002363)
Thank you. I think I need to take a closer look at this. :)