๐Ÿ‘‹ I'm Alex & I tweet about web dev stuff Creator of @trpcio, work @square, scout @a16z

Malmรถ, Sweden
Oh shit, we've also broken 100,000 weekly downloads on npm ๐Ÿคฏ npmcharts.com/compare/@trpc/โ€ฆ
๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ @trpcio just smashed 15,000 stars ๐Ÿ˜ฑ ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ

ALT tRPC surrounded by 15 stars

5
2
116
Alex / KATT ๐Ÿฑ retweeted
๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ @trpcio just smashed 15,000 stars ๐Ÿ˜ฑ ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ

ALT tRPC surrounded by 15 stars

๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ @trpcio now has >14,000 stars ๐Ÿคฏ ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ
2
4
81
Amazing work by @jullerino! ๐Ÿ™Œ Thanks so much @calcom for being sponsors of tRPC ๐Ÿ’ž
1
26
Alex / KATT ๐Ÿฑ retweeted
We merged our @trpcio migration for the Stately Studio yesterday ๐ŸŽ‰ Pending release soon, alongside multiple other enhancements ๐Ÿคซ Celebrated by having dinner with @alexdotjs and @DavidKPiano in Malmรถ. So much fun. I am humbled to spend the evening with two such brilliant minds!
4
8
106
I know I'm a boomer for asking about the `pages` directory, but is there any way of getting ErrorBoundary to work server-side in @nextjs on a page where we had `getInitialProps` in `_app.js`?
2
21
Thanks to @echobind for joining in as sponsors of @trpcio! ๐Ÿ’ž From @cball_: "Thanks again for all the work you've done. I haven't seen the team this excited about a change in tooling or process in quite some time." ๐Ÿฅฒ๐Ÿฅฒ
5
2
48
The first iteration of this has gotten approved internally at work, we'll be stress-testing our assumptions and hopefully OSSing it ๐Ÿ”œ๐Ÿคž
This week I've been working on a declarative isomorphic permission library. On the backend we create Prisma `WhereInput`s & on the frontend we get rules like this hopefully will OSS it soon
9
6
188
Alex / KATT ๐Ÿฑ retweeted
Okay I'm giving into peer pressure...Zod officially has a Twitter. Show some love to @zodtypes! ๐Ÿ˜
How does `zod` not have its own twitter account, @colinhacks ? I want to tag it so often ๐Ÿ˜‚
3
12
78
Some great tools on top of my mind: - REST - openapi-typescript, github.com/drwpow/openapi-tyโ€ฆ - REST - Orval, orval.dev/ - GraphQL - graphql-code-generator, the-guild.dev/graphql/codegeโ€ฆ - Or trpc.io to skip the whole schema thing altogether
4
5
28
Important caveat from @BenLesh: if you own the backend, you don't need a runtime parser. But if you do, please **automate** the whole `fetch`-thing based on your GraphQL/OpenAPI schema (or use @trpcio). The original dilemma should be a non-discussion.
Iโ€™ve nearly always controlled both ends of the request. The server is written in something type safe, with tests. So code validating the shape of the json at runtime is just wasted bundle and CPU.
1
17
NOT LONG TO GO! Join us this November 17-18, in London or virtually! Check out the 1โƒฃ0โƒฃ0โƒฃโž• Speakers lined up! Use code MODERN10 if you are joining us in person! โœ… Modern Frontends Live! ๐ŸŽŸ๏ธ modernfrontends.live Can only join virtually? Go here >> eventbrite.co.uk/e/modern-frโ€ฆ
1
13
21
This is what I'd do. The way you typecast an unsafe object doesn't really matter, just ensure it's the right type instead.
TypeScript decision: How should a function that calls fetch be typed? Options: 1. Type the return statement 2. Type the function's signature 3. Type both Poll in the next tweet ๐Ÿ‘‡ #typescript
11
32
346
I like treating my components as isomorphic "templates" (use client is also rendered on the server) and having access to a client-side data cache, but maybe I'm a boomer?
1
9
Further on my RSC confusion - I am starting to feel like `"use client"` components give the most flexibility in terms of making great UX. With RSC I have to do a server round-trip for *every* new page to transition, right?
3
34
It's not *magic* -- this is how you setup the rules for the different entities you have which leads to the TS hints you saw in the first tweet
2
9
Sort of how you setup the permissions & the roles
5
70
This week I've been working on a declarative isomorphic permission library. On the backend we create Prisma `WhereInput`s & on the frontend we get rules like this hopefully will OSS it soon
38
51
737
TIL that `"use client"`-components actually also renders on the **server**, which is actually really great, but I am really struggling how to grok & work with RSC You can follow my exploration at github.com/trpc/next-13
1
4
49