|
|
|
Show HN: JavaScript UI Tool Making HTMLElements Based on Template Literals
(github.com)
|
|
1 points
by peaBerberian
1051 days ago
|
|
I frequently make quick and small JS projects which do not need a complete React + Redux + Webpack environment (too heavy, bothersome to setup, re-learn and debug when it goes wrong).
Until now, I was mainly writing in them simple utils on top of native HTML API like `document.createElement` and `Element.prototype.textContent`. However, on a recent project, I just hit a spot where I began to have a lot of nodes, which made this call-based syntax hard to read.
After wondering if I should use React and its nice JSX (leading to a whole setup) or learn another generally-complex UI framework with a nice syntax, I wondered if I could not just implement a solution that would both be readable yet very simple to setup and understand. So here we comes! It's a very young and simple project (meant to be low maintenance), I may have missed some HTML peculiarities and I'm sure its share of performance gains.
The code is in the `main.mjs` file at the root of the repository. |
|