Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tipiirai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
421.
▲
by
tipiirai
3y ago
I'm sure React users also know whether they are dealing with a functional component or whether they are using hooks for state management.
422.
▲
by
tipiirai
3y ago
It is _absolutely_ an ES6 variable. Nue transpiler takes the code between the script tags and creates a true ES6 class instance from it. The larger examples are no different from the count=0 in here.
423.
▲
by
tipiirai
3y ago
True. When the array changed, the view is indeed re-rendered. Nue is probably not a good pick ATM for UI's with hundreds of rows and when list re-rendering performance is critical. I'll add the key- support if this becomes a frequ
424.
▲
by
tipiirai
3y ago
You can also call instance methods from the @click handlers. Nue syntax is heavily inspired by Vue.
425.
▲
by
tipiirai
3y ago
Consider opening a Nue file and knowing that the components are based on ES6 classes. Then it's rather obvious.
426.
▲
by
tipiirai
3y ago
Keys are unnecessary in Nue, just like many, many other framework abstractions. If you receive another list from the server, Nue takes care of it automatically. No need for diffing.
427.
▲
by
tipiirai
3y ago
> encapsulating modules I love vanilla JS. Are you referring to web components?
428.
▲
by
tipiirai
3y ago
Mind sharing your favorite frontend framework that got this right with an observable pattern?
429.
▲
by
tipiirai
3y ago
I prefer thinking scalability more literally (like Chris Coyier): an approach that works for a small site and remain the same approach for a large site. Nue's approach is MVC, which is a project not released yet. Check: https:/&#
430.
▲
by
tipiirai
3y ago
Unfortunately no benchmarks yet. Nue is very new. Will be there some day!
431.
▲
by
tipiirai
3y ago
Insane is cool. Nue is a heavy promoter of the separation of concerns pattern — which is the most effective way to avoid mixing different kinds spaghetti ingredients together. These small, extra $- characters are minor factors.
432.
▲
by
tipiirai
3y ago
> Having just count=0 is stupid and you will learn it the same way as Svelte did. I obviously disagree. This is not only compact, but also standards- based. It's an ES6 variable. I don't expect Nue to change here, like ever. Sv
433.
▲
by
tipiirai
3y ago
The update() method is there because Nue does not make a difference between reactive variables and other variables and it's impossible to know if a state changed when there is no specific DOM event or array manipulation call.
434.
▲
by
tipiirai
3y ago
There's a lot of discussion around Web Components in Nue JS discussion forum. Can I ask you submit your thoughts here? https://github.com/nuejs/nuejs/discussions/44 Would love to hear the details! Sample
435.
▲
by
tipiirai
3y ago
Thank you! So glad to hear this
436.
▲
by
tipiirai
3y ago
Author here. After releasing Nue JS here just two weeks ago[1], the most common questions were: “How does reactivity work”? and “How is this different from Svelte”? This article attempts to answer those. [1]: https://news.ycombin
437.
▲
Nue.js: Rethinking Reactivity
(nuejs.org)
76 points
by
tipiirai
3y ago
|
145 comments
438.
▲
by
tipiirai
3y ago
btw: I'm not comparing npm run vs plain npm. I'm comparing npm run some/script.js vs node some/script.js
439.
▲
by
tipiirai
3y ago
The above command is indeed more characters, but I don't need to set the NODE_PATH on the current working directory. Also the `-r ./node_modules/env` is unnecessary.
440.
▲
by
tipiirai
3y ago
One rationale is this "You can reduce complex node-related shell scripts into simple one-liners". But I can also do that with my own script and make the one-liner even simpler. ie `node deploy` is simpler than `npm run deploy`. I
441.
▲
What is the use case for NPM run?
1 points
by
tipiirai
3y ago
|
4 comments
442.
▲
by
tipiirai
3y ago
Strict YAML looks great! Would love to see this becoming a standard and then get implementations for other languages. Not just Python.
443.
▲
by
tipiirai
3y ago
Challenge accepted! Likely 5x less code and 2x faster. I'll keep you posted.
444.
▲
by
tipiirai
3y ago
Nue JS examples: https://nuejs.org/docs/nuejs/examples/
445.
▲
by
tipiirai
3y ago
If you strive for extreme performance you must inline CSS to get the first viewport fully rendered after the first request has been made. The rest can come progressively.
446.
▲
by
tipiirai
3y ago
The canvas painting / $effect() demo on the video was super cool! Is the source publicly available somewhere?
447.
▲
by
tipiirai
3y ago
I guess we are all waiting for Rich Harris to step in and comment on this one. I'm sure he has followed this Vue experimentation and has a clear argument to make. At least I hope so.
448.
▲
by
tipiirai
3y ago
Here's Todo MVC made with Nue js: https://nuejs.org/todomvc/ Source code: https://github.com/nuejs/www/blob/master/todomvc/todo-compac... More details to come
449.
▲
by
tipiirai
3y ago
Here you go: https://nuejs.org/todomvc/
450.
▲
by
tipiirai
3y ago
10x less code is definitely possible and it's my duty to prove it. I'll add better examples to the website next week.
More ›