3 ms·
Sorry for being the pedantic one, but the article early on states "without writing a single line of JavaScript" and then, in the first code, after showing confi
by johannes1234321 6y ago
Sorry for being the pedantic one, but the article early on states "without writing a single line of JavaScript" and then, in the first code, after showing configuration files, one can read
<script type="module">
import init from "/wasm.js";
init();
</script>
So two lines of JavaScript ...
- ncmncm 6y agoAh, but that wasn't written, it was cut'n'pasted, which Doesn't Count. Or does it?
- johannes1234321 6y agoAnswer A: For a joke it doesn't matter. Answer B: By that logic it is "without writing any code" But yes, the example is nice and it's not a production line, probably not even copyrightable.
- arkanciscan 6y agoAnd some HTML as well. Yew seems to use a JSX-like template language, but it's got to hit the DOM eventually. Then you're gonna need to handle Events and style with CSS. How do you handle errors? What does all this look like in DevTools? People act like JS is the worst part of web development which is simply naive.
- johannes1234321 6y agoAbout HTML they made no claims. For a SPA HTML also is essential (they could use GL if they don't want to use (lots of) HTML) And errors and events are handled in the Rust code.
- rwoerz 6y agoYes, two of them instead of a single one. Promise kept!