Christopher Horobin

1.9K posts

Christopher Horobin

Christopher Horobin

@c_horobin

Katılım Kasım 2012
194 Takip Edilen1.2K Takipçiler
Julien Barbay
Julien Barbay@y_nk·
trying now to migrate from react-router to @tan_stack - i'm a bit confused as for why we need to have the path passed in `createFileRoute` since the routing is file-based 🤔 (cc @tannerlinsley)
English
1
0
5
839
Christopher Horobin
Christopher Horobin@c_horobin·
@tannerlinsley @y_nk @schanuelmiller @tan_stack @vite_js We cannot use explicit types for the whole route definition because it needs to be an inference site. You need to infer from the route definition options users put there. I also prefer explicit types being totally optional for users and not required
English
1
0
2
155
Julien Barbay
Julien Barbay@y_nk·
@tannerlinsley @c_horobin @b_dammylolah @tan_stack i see. another choice would be to pass the `Route` object as 2nd arg of the component `(props, route) => JSX`? that'd mean props has to be passed as generic of the route tho. or maybe if so, add `route` to the props with a Props & { route: Route<Inferred> }` 🤔
English
2
0
1
264
Earnstein
Earnstein@b_dammylolah·
Look how easy it is to protect my dashboard routes. Super clean, super Tanstack, no redirect new URL chaos, zero middleware.ts gymnastics. Not too much code. Readable. 😮‍💨 @tan_stack 😍
Earnstein tweet media
English
44
49
1.3K
142.8K
MrPotato | Lynkfire
MrPotato | Lynkfire@MrPotatoDip·
in tanstack start you can simply list a list safely with listOptions. Here is a route in array with params and search params both are typed.
MrPotato | Lynkfire tweet media
English
2
0
8
2.2K
Eliseu
Eliseu@eliseumds·
@tannerlinsley @c_horobin @letstri @tan_stack From my exp, inference using template literal types is kinda slow (we have a ton of routes though). Have you noticed any perf impact in terms of type checking?
English
2
0
1
721
Valerii Strilets 🇺🇦
Is it even legal? I can fetch data in parent route and use it in any child routes. @tan_stack never ceases to amaze me
Valerii Strilets 🇺🇦 tweet media
English
31
34
689
83.6K
Christopher Horobin
Christopher Horobin@c_horobin·
@eliseumds @tannerlinsley @letstri @tan_stack We basically generate a route tree which is easy for TypeScript to consume but nothing in the route definitions is precompiled. The point is that what you write is fully inferred. The route tree generation sprinkles explicit types to link routes together
English
0
0
1
51
Eliseu
Eliseu@eliseumds·
@c_horobin @tannerlinsley @letstri @tan_stack From what I’ve seen, the pre-compiled routeTree.gen.ts contains the parent-child relationships and the path parameters are later inferred from the path strings. Is that it?
English
2
0
1
207
Tanner Linsley
Tanner Linsley@tannerlinsley·
If it wasn't clear before this already, I am 100% the most chaotic part of TanStack.
Tanner Linsley tweet mediaTanner Linsley tweet mediaTanner Linsley tweet mediaTanner Linsley tweet media
English
22
6
349
26.4K
Tanner Linsley
Tanner Linsley@tannerlinsley·
Discussing TypeScript APIs years ago (when I was a TS shunner): Smart person: "You should design your API for type-flow. Least context to most context". Me: "You're nuts. Dynamism is a feature" I now gratefully and happily eat those sad naive words every hour of every day.
English
5
5
237
17.6K
Gabriel Vergnaud
Gabriel Vergnaud@GabrielVergnaud·
Pro tip: Don't write your #TypeScript union types by hand, use a Type Catalog instead! Why are Type Catalogs better? Find out in the thread 🧵 👇
Gabriel Vergnaud tweet media
English
37
167
2.3K
322.9K
David
David@codewithdavid·
@c_horobin You can fix Prisma 🙏
English
1
0
0
138
Christopher Horobin
Christopher Horobin@c_horobin·
Never thought I would be described in this way. Genius I'd reserve for him. I just like types.
Tanner Linsley@tannerlinsley

@AdamRackis @c_horobin He’s a genius. I may have designed a lot of the initial architecture, but he’s the one making things crazy fast and bulletproof. I am now the student of my own library.

English
2
1
65
8K
Christopher Horobin
Christopher Horobin@c_horobin·
@schanuelmiller @mattpocockuk You mean this? #code/C4TwDgpgBAIhBmBDArgG2FAvFA3gKCingHtiAuKAZ2ACcBLAOwHMBuPAXzYgA8xiaMoSFAAKiGogC2lADwAVAMoRUEAMbAIAEwA0UOQDFUiJgD4suAlWVrgAfgoAKRmGTAKcJGmABKLGeQMANYMxADuDFA8GgyalHqGxlC2ekoq6lpQ7ggo6GzsUABkUADyYMB0xAzyqTZaugZGpmx4QtCl5ZXV1uk68Y1m2IrdGpqR3NGxuFAARuIU1PTMUOyWyThEjfZ9iUXTpCqIESuEFPiE5xvGWw07RIiolBCWhJx4eDx8AkQB6hUR8AEumkRvUEqYHMQypQtmIJNIgbVejdTN4KENgRkzlAAPTYu6BaB0SRgVCWGgQYDIGgRHD5RBxdGIvJvAEMBxYx7Axx0XyYMzs54zOZQADkJGIIuIlnY3m0llxUHpVFIESVAAN4I01VA6HEwOTHgxgHLCAq1YyetrdVAQhhGPAIDRyaNpiAoMAABbQcmU6nu8DQYjwKBqzk2bWHECSfgQE04vGMagQRCjOgYJCoB5C1SBd3EEMeHLAbWWTXGCgZx4cbxsIA" target="_blank" rel="nofollow noopener">typescriptlang.org/play/?#code/C4…
English
0
0
0
138
Christopher Horobin
Christopher Horobin@c_horobin·
Type level code is just another language to learn. If you're uncomfortable looking at it, you probably don't know it that well
English
1
0
24
2.6K
Christopher Horobin
Christopher Horobin@c_horobin·
Inference still happens, even during generation. You still wait for it.
English
1
0
1
1.6K