Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

or even h1 = React.createFactory('h1'), ... and so on for every that you use in the file, and then use h1({}, 'text') in the code.


What about h1 = React.DOM.h1;?

Personally, I moved from using DOM tag names as variable names ('a' being the worst) to saving 'var DOM = React.DOM' (or '{DOM} = React') and then calling DOM.a(props, children...)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: