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

Check out Tachyons and similar CSS libraries which use CSS classes to essentially define inline styles efficiently. When you are making components, this can work out well in containing potential interactions of CSS. http://tachyons.io/

Combined with a lightweight vdom library like Mithril.js using the HyperScript API and maintaining state in plain old JavaScript objects (updating on any user interaction, network events, timers, or some few other events), this makes web single-page application development quite pleasant and scalable. You can also test much of such vdom-based UIs without creating real DOM nodes. https://mithril.js.org/

Here is one example FOSS project I wrote in that style: https://github.com/pdfernhout/Twirlip7

Of course, few web developers grok this yet because most affirm "best practices" from years ago (e.g. semantic CSS, HTML-first design, JavaScript as a progressive afterthought) -- and also are used to coding in non-standard HTML-ish templating systems (e.g. Angular, Vue, JSX) which give them a false sense of security they can maintain more complex apps that are mostly about JavaScript. React has helped a lot of developers begin to move past some of that, but it has its own licensing issues and also baggage (including JSX) from being only half-way to the new paradigm outlined above.



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

Search: