4 ms·
isn't that just syntax sugar? I believe it compiles into (for some el function and safe string tag) return el("div", { children: [ el("h2", { childre
by _v7gu 3y ago
isn't that just syntax sugar? I believe it compiles into (for some el function and safe string tag)
return el("div", { children: [
el("h2", { children: [safe`You clicked ${count} times!`]) },
el("button", { onClick: () => setCount(count - 1), children: [safe`Decrement`] }),
el("button", { onClick: () => setCount(count + 1), children: [safe`Increment`] })
]});
The "it's just javascript" part comes from having no hidden getters, setters or proxies littered in code that may or may not behave as how we expect, and not littering the html with react-specific attributes for iteration, events, etc
- tipiirai 3y agoIt surely is. React is a good pick for frontend engineers who prefer to use JavaScript or TypeScript. Nue is designed for UX engineers, who prefer a HTML- like syntax for defining the structure & layout.