Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tipiirai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
391.
▲
by
tipiirai
3y ago
I was talking about the applications I personally use frequently, like Slack for example. Unlike the parent said that "this becomes a frequent issue in any app at scale", I just don't see this happening on the UI's I per
392.
▲
by
tipiirai
3y ago
Glad to hear people still care about separation of concerns! It's been so untrendy. Particularly after Tailwind came around.
393.
▲
by
tipiirai
3y ago
This is so demotivating. I wasn't prepared to this large downplaying of Nue.
394.
▲
by
tipiirai
3y ago
Thanks! You can import code on a top- level script tag. Will provide examples.
395.
▲
by
tipiirai
3y ago
Are you talking about Svelte- like two-way data bindings? Like here for example: https://svelte.dev/blog/write-less-code — Same works in Vue. MVVM is Not implemented in Nue yet.
396.
▲
by
tipiirai
3y ago
Not sure what you mean. Can you provide some sample code so I can undesrstand the issue / use-case?
397.
▲
by
tipiirai
3y ago
True, but how should I use this info to improve the wording?
398.
▲
by
tipiirai
3y ago
I thoght this would be a good one, but it was disregarded as "wholly immaterial" point
399.
▲
by
tipiirai
3y ago
Good point! My goal exactly. But sadly I'm not immune to hate speech.
400.
▲
by
tipiirai
3y ago
The question is more like: "What are the benefits of choosing JavaScript over TypeScript?" You must know that there are pros and cons in every language. There is a reason languages like JS, Python, Zig, C, Go, Rust.. exist.
401.
▲
Ask HN / TypeScripters: How Choose JavaScript?
2 points
by
tipiirai
3y ago
|
13 comments
402.
▲
by
tipiirai
3y ago
Jenk — can you help me with a list of valid reasons to choose JavaScript so that the TypeScript community is pleased? This would help me a lot. Thank you!
403.
▲
by
tipiirai
3y ago
Thank you Pekka! (Making a super wild guess that you are from Finland and your name is Pekka :)
404.
▲
by
tipiirai
3y ago
When a Nue component is compiled it creates a native ES6 class directly from the contents of the inner script tag. The ES6 code is not traversed at all, let alone altered. That is: count = 0 is a native ES6 class instance variable.
405.
▲
by
tipiirai
3y ago
Hardly a frequent issue. I use zero apps in real life with more than 30 items on a single view, let alone 100 or 1000 — that all needs to be completely changed in one operation without re-rendering. It's a common theme in benchmarking
406.
▲
by
tipiirai
3y ago
The code inside the script tags is ES6, the pre-processor does not "masquerade" it as the parent commenter says. It's taken as is. Also not sure what in this discussion is relevant.
407.
▲
by
tipiirai
3y ago
Not sure what you refer to as "this" or "it". Both Svelte 4 and Runes are are quite different from Nue.
408.
▲
by
tipiirai
3y ago
You can call an instance method as well, as seen on the examples. Similar to what you can do in Vue and with a standard JS 'onclick' handler.
409.
▲
by
tipiirai
3y ago
Thank you, Mack — I can feel it!
410.
▲
by
tipiirai
3y ago
Please read the article and the section "Reactivity under the hood": https://nuejs.org/blog/rethinking-reactivity/#reactivity-und... You'll see that the compiled code is pure JS and parsed by the JS
411.
▲
by
tipiirai
3y ago
It 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.
412.
▲
by
tipiirai
3y ago
The onclick="addFruit" calls an instance method between the inner script tags. Similar to how JS would call a global window.addFruit with a similar syntax.
413.
▲
by
tipiirai
3y ago
Thank you, Alan!
414.
▲
by
tipiirai
3y ago
Thank you for this! People here are so discouraging
415.
▲
by
tipiirai
3y ago
Sorry, which code? If you want getters and setters, you'll use standard ES6
416.
▲
by
tipiirai
3y ago
Please read the whole sentence. It starts with: If React is “Just JavaScript, then...” React users often say that "It's just JavaScript" but then they write: return ( <div> <h2>You clicked {count} ti
417.
▲
by
tipiirai
3y ago
I sure have! So Mobx + React is your favorite combo?
418.
▲
by
tipiirai
3y ago
When building larger projects you should consider using a MVP (model-view-controller) pattern to separate your view code from the business logic. This way you can keep the view code simple, and the model code out from view-specific abstract
419.
▲
by
tipiirai
3y ago
This the same as in standard JavaScript DOM event call. If you want to call a returned function in JS, you can do: <button onclick="getFunction()()">. Similar behaviour in Vue (and Nue)
420.
▲
by
tipiirai
3y ago
Yes. If there are timers, SSE, or fetch responses you must explicitly call the update() method.
More ›