Dennis Kats

640 posts

Dennis Kats banner
Dennis Kats

Dennis Kats

@denk0403

Lead Software Engineer at $DECK. Previously @meta, @blueportdotcom, & @Carbonite. I like to share things that stimulate my brain cells. He/Him.

Brooklyn, NY Katılım Haziran 2013
612 Takip Edilen65 Takipçiler
Cheng Lou
Cheng Lou@_chenglou·
My dear front-end developers (and anyone who’s interested in the future of interfaces): I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at least in concept): Fast, accurate and comprehensive userland text measurement algorithm in pure TypeScript, usable for laying out entire web pages without CSS, bypassing DOM measurements and reflow
English
662
3.2K
27.4K
5.8M
Dennis Kats
Dennis Kats@denk0403·
@ChadNauseam I had to implement the backward energy version in Java for a freshman year project, and it's to this day one of my favorite projects. I recently also turned it into a web version, but with pure JS denniskats.dev/seam-carving/. Super cool that you're using WebGPU.
English
2
0
1
436
Nauseam (in sf!)
Nauseam (in sf!)@ChadNauseam·
Seam carving with forward energy. Gotta be one of the coolest algorithms of all time.
English
27
74
1.9K
185.3K
Dennis Kats
Dennis Kats@denk0403·
@wesbos #client-references" target="_blank" rel="nofollow noopener">overreacted.io/functional-htm…
QME
0
0
0
24
Dennis Kats
Dennis Kats@denk0403·
@wesbos Maybe there was a time it wasn't implemented yet, but my understanding is that it was always intended to work this way. And it's not specific to server functions; you can do this with references to client functions too. Dan's Functional HTML blog post explains this pretty well
English
1
0
0
947
Wes Bos
Wes Bos@wesbos·
Some guy on reddit figured out that you can now use DOM events like onClick onHover _in a react server component_ no client component required I can't find any docs on this. When was this introduced? Confirmed it works on my Waku site
Wes Bos tweet mediaWes Bos tweet media
English
25
8
303
60.7K
Dennis Kats
Dennis Kats@denk0403·
@w2k_ @mscccc To be fair, idempotence doesn't mean side-effect free. An unsubscribe link is likely idempotent. But GETs should also be "safe", which unsubscribing is not.
English
1
0
5
270
Wilhelm
Wilhelm@w2k_·
@mscccc Exceptionally poor design that isn't even HTTP/1.1 compliant. GET requests are always idempotent. No exceptions.
English
3
1
64
5.1K
Adam Aaronson
Adam Aaronson@aaaronson·
Word with the lowest standard deviation of letter position in the alphabet, for each length
Adam Aaronson tweet media
English
96
453
10.3K
783.7K
Dennis Kats
Dennis Kats@denk0403·
@yoavabrahami @rutu_3 My guess is requestHandler is allowed to be synchronous, so the OP wants to ensure it returns a Promise, but you’re right that wouldn’t work if it synchronously errors. Promise.try is more likely what they want
English
1
0
0
26
Yoav Abrahami
Yoav Abrahami@yoavabrahami·
@rutu_3 whats the problem? just a functional express style request handler. but I have to say that PromiseResolve().catch() is a bit strange... probably not doing what you'd expect
English
1
0
7
734
Giyu
Giyu@rutu_3·
If you can understand this piece of code, my friend, I can say you're crack dev 🙌🏻
Giyu tweet media
English
252
35
1.1K
191.2K
Dennis Kats
Dennis Kats@denk0403·
@tomasklingen @pontusab Truthfully anything client-only should likely be integrated with Suspense. That way it takes advantage of your app's existing loading sequence. Again, not sure what the perf characteristics are, but I believe it's the most idiomatic approach: #providing-a-fallback-for-server-errors-and-client-only-content" target="_blank" rel="nofollow noopener">react.dev/reference/reac…
English
0
0
0
30
Dennis Kats
Dennis Kats@denk0403·
@tomasklingen @pontusab I wouldn't say it's outdated considering uSES and transitions were both added in v18. But I also don't know enough about React internals to know the perf tradeoff. However, in my experience a top-level hydration context doesn't work well with streaming/lazy-loaded components
English
1
0
0
42
Dennis Kats
Dennis Kats@denk0403·
@i549 @hauke_schnau @adamwathan Well it doesn't really. The render prop is called by the server component; it's never serialized to the client, only its result. The pattern has unproven value in RSC, but my point is just that passing functions to server components is a bit more nuanced than it's "not allowed"
English
0
0
1
44
Adam Wathan
Adam Wathan@adamwathan·
I really wish APIs like this were compatible with React Server Components... No interactivity, no context, just a callback passed between two components that I want rendered on the server.
Adam Wathan tweet media
English
18
4
269
172.9K
Dennis Kats
Dennis Kats@denk0403·
@i549 @hauke_schnau @adamwathan Or do you mean 'use client' for something other than a component? I wouldn't say that just happens to work; it's consistent with the higher-level behavior of 'use client'. There's a good article on it: overreacted.io/functional-htm…. But tbh I haven't had a legit use case for it yet.
English
1
0
0
54
Dennis Kats
Dennis Kats@denk0403·
@i549 @hauke_schnau @adamwathan The children function? It's just the render prop pattern. Most use cases for it got replaced with Context and hooks, but it is occasionally useful still.
English
1
0
0
49
Dennis Kats
Dennis Kats@denk0403·
@i549 @hauke_schnau @adamwathan You can, but how the function is defined is more about where you call it. If it's called on the server, then you can inline it like in the OP's example. If it's called on the client, then it needs to be marked with 'use server', or be in another module marked with 'use client'.
English
2
0
0
88
Dennis Kats
Dennis Kats@denk0403·
@cnakazawa It seems sort of similar to some abstract ideas I’ve been having for months but haven’t had the time to synthesize. I would love to try out what you came up with
English
0
0
0
123
Christoph Nakazawa
Christoph Nakazawa@cnakazawa·
Reply if you'd like to try out fate this weekend.
English
10
0
15
2.6K
Tanner Linsley
Tanner Linsley@tannerlinsley·
I'll continue to die on the hill of "magic directives are bad API interfaces". They're not type-safe, they're not extensible, no native runtime control, they're just strings. ... I can't believe I'm saying this, but I would rather debate @ directives. Pls rewind history.
English
91
127
1.7K
216.4K