4 ms·
If you're a front-end only developer not only do you use the same hammer (big framework) for all nails, the use of that hammer is what gives you job security an
by peruvian 6y ago
If you're a front-end only developer not only do you use the same hammer (big framework) for all nails, the use of that hammer is what gives you job security and satisfaction. If companies switched to using old fashioned server-rendered pages with light JS, half of HN would not have anything to do at work.
- spion 6y agoFor the first year, anyway. If the project continues to grow, next year they would be called to deal with the enormous spaghetti mess that has resulted.
- dgb23 6y agoIt’s as if everyone forgot why we moved presentation logic to the same place and why we favor declarative programming over DOM mutations. When you render is completely orthogonal to that.
- 6510 6y agoright, i only do vanilla: sites are finished fast and they just work. not someone any one would hire. people are really used to frameworks. it would be a step back for them. >In one place I wanted to change a button’s HTML contents. if you know what the hidden elm is going to contain you can just add the html to the page as a hidden elm. if it can have 2 states you can also add both nodes as html. just show only one at a time. the <i> and the <object> are always children of <button> i would target them as such, no need to have a class. unless you use <i> 2x. (one for each state) but i think the icon should be the button bg. onclick gives you a reference to the button with which you can change it's class. things inside (now styled by the classname of their parent) will change along. (swap bg, hide/show etc)