Re:Nue: A React/Vue/Vite/Astro Alternative
by niutech on Friday September 15, 2023 @05:35AM
(#37520517)
React is far from vanilla HTML. It uses JSX with attributes e.g. `className` or `htmlFor` instead of HTML's `class` or `for`. And JSX requires compiling to HTML rather than being HTML from the beginning.
[ Parent
| on HN ]
Re:Nue: A React/Vue/Vite/Astro Alternative
by Kiro on Friday September 15, 2023 @06:08AM
(#37520780)
Both className and htmlFor are native.
https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...
https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelEl...
Re:Nue: A React/Vue/Vite/Astro Alternative
by arcanemachiner on Friday September 15, 2023 @07:42AM
(#37521516)
Woah.
Re:Nue: A React/Vue/Vite/Astro Alternative
by niutech on Friday September 15, 2023 @09:58AM
(#37523048)
Yes, but it's JS, it isn't vanilla HTML.
Re:Nue: A React/Vue/Vite/Astro Alternative
by MrJohz on Friday September 15, 2023 @06:15AM
(#37520822)
It's almost identical to vanilla DOM, though, which does use className and htmlFor.
I'm not sure that the compilation aspect is relevant - pretty much all modern frameworks using a template language have a compilation step. ngFor doesn't exist in the browser after all! ;)
Re:Nue: A React/Vue/Vite/Astro Alternative
by martinsnow on Friday September 15, 2023 @06:37AM
(#37521008)
You're confusing the XHTML/HTML and JavaScript API naming schemes