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

I took the same route - instead of trying to keep HTML in one place, JS in another, CSS in another I made separate files for each component including all the necessary HTML, JS and CSS in one file. It makes more sense because I write them together and debug them together. Also, I don't need to find where are the CSS selectors in a huge monolithic CSS file, or the same about JS functions. I don't let a component become too complex, so the 1 file/component ratio is just right.


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

Search: