You don't need React: creating a minimal UI library in Vanilla JavaScript
1–10 of 117 posts
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#2Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#3Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#4How this made it to HN front page?
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#5Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#6What is the thing you hate about react, and what is the thing you require in an alternative?
I hate bloat and require lightness, so I use Preact.
I also hate complexity and difficult to read stuff, so when I look at the proposal here, I don't see anything appealing, other than "look! it's not react!"
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#7You keep using that word. I do not think it means what you think it means.
React most definitely falls under what would be called a "retained mode" of some sort. And the UI library described here is also.
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#8> The only potential issue with immediate mode is performance, since we need to re-render the entire UI on every state change. How this made it to HN front page?
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#9Notice that in the task list example, if you leave some text in the input and check off a task, your text will be erased.
If we could truly treat the DOM as an immediate-mode UI, there would be no need for React/Preact/ Svelte/Solid/etc. But it turns out there are a fair number of quirks like this that preclude such simple replacements from working correctly.
(That said: I am all for experiments like this for learning, or for fun, or to try out unexplored framework design space!)
Re: You don't need React: creating a minimal UI library in Vanilla JavaScript
#10I built an Astro Starter that uses just CSS in a scalable way for simple websites. Content is written in Markdown / MDX files. Design tokens are set in var.css. Other stuff is defined in one config.ts file.
Global styling is set though a few CSS files (Global, Reset, Var, Util, Markdown), components are scoped in styling but utilise the tokens.
Link: https://starter.bryanhogan.com/
GitHub repository: https://starter.bryanhogan.com/