👋 I'm Alex & I tweet about web dev stuff Creator of @trpcio, work @square, scout @a16z

Malmö, Sweden
after reading the post and watching this video, I must say I understand the temptation it looks mind-blowingly good
LiveView 1.0 is so good that it's tempting me away from React. Seriously. Video up now!
8
2,744
Is it possible to use event triggers on @vercel postgres and listening to them in an API route?
1
8
3,657
I was about to spend time testing and then I realised I could likely just get a quicker answer here
909
Alex / KATT 🐱 retweeted
Oh @dhh, you make me chuckle. The vast majority of "TS devs" don't live anywhere near here, so maybe loosen the grip on your anti-TS baseball bat? 😆 Your quoted tweet screams library author/code. If anything, this is a simple testament that writing libraries and abstractions is definitely a 1% path. Even a vast majority of "just JS" devs can't be trusted to write decent library-level abstractions, let alone type-safe ones. Nothing is ever this binary, you know that. Just for kicks, let's write some "just JS"! Look ma! No TS! ... Well, spoiler alert, this is 100% type-safe code, backed by the kind of code you just slighted (and not even that much of it). Because of the 1% that invest the time into understanding static typing, generics, type-safe architecture that make writing TS virtually the same as never writing it. nitter.catsarch.com/dhh/status/17885798739…
Never seen a better ad for ditching TypeScript. You don't have to live like this!!
46
101
1,332
206,310
Alex / KATT 🐱 retweeted
Replying to @AdamRackis @t3dotgg
If you have a server in @typescript - please use @trpcio over raw React Query. Thanks.
4
5
111
28,905
So many of my main gripes over the last year are just... fixed in TS 5.5. Super exciting release. 🍿 devblogs.microsoft.com/types…
3
3
64
4,974
Especially for monorepos, see this thread
Good news for monorepos!
1
5
1,243
But also Inferred Type Predicates I.e. no more of this `.flatMap()`-crap below, you can just `.filter()`!
TypeScript tip 💡 Use `.flatMap()` to filter items in a type-safe manner. Try it 👉 typescriptlang.org/play?targ…
9
1,280
Good news for monorepos!
Great news for those extending base TypeScript configs Soon we should be able to use relative paths to the "final" config file ${configDir} placeholder Previously it was confusing, and you had to duplicate many fields in the child configs to use relative paths
1
2
50
7,698
TypeScript 5.5 is such a huge release and fixes most of the major issues I've had the last year
7
713
Feeling mad React Miami fomo rn
4
1
45
5,826
Can it close brackets correctly tho
TIL about @github's upcoming Copilot Workspace that @ashtom covered today at #TED2024 as both the End of Localhost guy and the AI Engineering guy this is maximum venn diagram overlap for me also a buuuunch of ai devtools startups are boutta be sherlocked holy shit
2
1
19
3,822
Cascade delete is quite nice when used carefully 🫣
5
1
60
13,082
I'm glad "JS enabled" behavior is getting aligned with the "JS disabled" behavior - it's good for progressive enhancement. But I still think the primitives aren't there to easily make great forms without unnecessary complexity in how you define the backend of server actions 🤷
👀 React 19 + Form resets Uncontrolled forms will reset on action end (no impact on controlled form inputs) github.com/facebook/react/pu… New public API to trigger behavior manually in transitions: ReactDOM.requestFormReset github.com/facebook/react/pu…
12
4,140
I mean it's xhtml which we all wrote once upon a time in order to get the w3c validator the give us green ✅✅ I can't remember when or why it started & stopped being "xhtml is the way" (maybe html5? I can't say I remember exactly what that meant either) 😅👴
prettier doesn't care 😂
3
15
4,775
Can anyone show me a use case of the `currentState`-argument in a server action when using `useFormState()`? I struggle to see why it exists.
9
2
56
52,069
- 🫣 AFAICT, you can't trust the value here and it needs to be validated alongside `formData` - 🌀 It needs to be the same type as the return type of the action, which makes inference circular - 🚩 the React docs need a troubleshooting section to explain it's there (react.dev/reference/react-do…), it should be a red flag that the API could be tweaked - 🧩 The arguments change depending on how you call it. This sorta goes against the "React way of thinking" that things are an independent "lego piece" that you can drop anywhere - 🍟 The state in `useFormState(action, initialState)` gets serialized and passed between server<->client which to me just adds unnecessary payload - ℹ️ If you need to pass additional context with form data, you can add a `<input type="hidden" />`, I don't see why React needs to provide this
2
24
6,379
I made a POC of an API I think is more sound:
nobody: me: I hacked together a POC of an alternative API to `useFormState()` / `useActionState()` that I think is nicer than what's in @reactjs / @nextjs today github.com/KATT/react-server…
2
2,772