|
|
|
|
|
by _v7gu
988 days 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 |
|