TANSTACK is an open-source collection of high-performance libraries for JavaScript and TypeScript applications, primarily focused on state management, data fetching, and table utilities. It includes popular libraries like TANSTACK Query, TANSTACK Table, and TANSTACK Router. These libraries emphasize declarative APIs, optimized performance, and developer-friendly features, and they are increasingly popular for modern front-end development. Tanner Lindsley is the creator of TANSTACK, and he joins the podcast with Nick Nisi to talk about the project, SSG, type safety, the TANSTACK Start Fullstack React framework, and much more. Nick Nisi is a conference organizer, speaker, and developer focused on tools across the web ecosystem. He has organized and emceed several conferences and has led Nebraska JS for more than a decade. Nick currently works as a developer experience engineer at WorkOS. Tanner Lindsley, welcome to Software Engineering Daily. How's it going? It's going great. How are you? I'm doing fantastic. Why don't you tell us a little bit about yourself? I make software. Primarily open source software now, as of about almost...
almost a year ago it marks when i went full-time on tan stack so it's going really well before that i was running a startup with some friends called nozzle i spent 10 years there solving difficult front-end problems which explains why a lot of the tools i have today exist yeah that totally makes sense before that i was like an angular ionic junkie who was making money off of wordpress um so I actually, it's funny, I actually learned how to write JavaScript kind of through Angular 1.x. It was a weird experience. And then afterwards, I was like, oh, I need to learn JavaScript. So that's kind of where I got my start into JS. But now, yeah, I wake up in the morning and I eat, sleep and breathe, tan stack open source and make sure that, you know, it's helping people. Nice. Well, anecdotally, I can say that it is because it has helped me a ton and many, many others. My first introduction to the tan stack would have been through React query, now tan stack query. Where did that lie? Was that?
one of your first projects? Was it the first project in the TanStack? No, the first project actually was TanStack Table. Back then it was called React Table. That was one of the very first ones that I wrote that is still around today. Yeah, so I wrote React Table way back. We needed it at Nozzle. I have a video from React Summit in like 2020 something. I can't remember. But I talked about React Table. That's a good one if you want to go check that out. But from there, after that, I wrote React Static, which I don't maintain anymore. It's unmaintained, I think. But this was back when like...
ssg was really really hot and at the time it was gatsby and next js were really up and coming and they were doing really cool things and i put my hat in the ring and i started building react static which was like this framework essentially before server frameworks really took off and it was good it was fast that so back then everybody was like how fast can you you know build your static site and for a while i was i was killing gatsby and next because i was doing i think i was one of the first ones to do multi-threaded builds for ssg so like if you had multiple cores you could just zoom And I got pretty good at React Static stuff. And then we realized that I wasn't using React Static at Nozzle very much. We didn't use it. It was just kind of fun. So I was like, maybe I shouldn't put all my time into this. And then Gatsby raised $30 million. And Next.js raised, I don't know what their first round or two was, but the next round they raised was several tens of millions of dollars. And they're like, yeah, and we're going to be dumping everything we have into Gatsby and Next. And I was just like, oh my gosh. Well, I don't really have the time or the money to compete.
with this right now. So I decided to throw in the towel. I gave React static to a company, a group of people that, you know, we're going to keep maintaining it. And then after a while, I just switched my SSD to next. And then after a while, I just stopped doing SSG. Not really. I mean, we kept using it through Next, but then everything started to become more hybrid. And then it just became like a lot of caching, a lot of CDN caching type stuff. So it's all server driven now. I'm starting to get back into SSG a little bit. So TanStack Start is going to have, already has some like static site generation features to it that are pretty cool in my opinion. That's kind of like bringing back React Static for me because it was a lot of fun.
Nice. Well, yeah, let's, let's dive into that and talk about 10 stack start. So it is more of like a full framework on the level of, would you say like next and remix and kind of like at that level? Absolutely. Yeah. So it's, it's a full stack framework, which just means it has a server first. I mean, it has a server first technical mentality to it. So just like next JS and remix, you know, it's doing full SSR and hydration. We're running that server in, you know, on deployed server somewhere, whether that's serverless or, or long running or whatever. And then it still becomes an SPA just like.
many other full stack frameworks. So once you've hydrated and streamed the response down, it becomes an SPA. And most of it is just based on tan stack router. I would say like 90% of the APIs that you use or are going to use when you build a tan stack start app, you're just using tan stack router start. is actually pretty unrelated to a lot of the public API that you touch. There's obviously a lot of dependency on Tanstack router and start to do the hydration and the streaming and kind of take care of the black box stuff that nobody really ever wants to touch the implementation details of. But then in design for how you interact with it, all of the routing and all of the application stuff is very separate. So if you're doing something with server functions, that comes from start. If you're doing something with SSR, you don't have to worry about that. You just use the router. So most of the time you're just writing.
an application as if you're writing a good old spa and and the reason that works is because it's isomorphic so by default and this is how remix is too we we're rendering everything on the client we're also rendering that on the server during ssr unless you explicitly say like hey don't don't try and render this because we're using local storage or something like that but otherwise everything runs during ssr and on the client by default and that's a pretty that's a pretty big departure from next js app router where they're pushing everything kind of like hey not everything runs well i mean i guess client components what a bad name, client components, because really they render on the server too. They're isomorphic, right? So the mentality is just in like the difference of developer experience. With a tan stack router and start app, it's much more like Remix where, you know, you feel like you're writing an SPA and you're kind of opting into server specific features and server specific things as you need them instead of kind of having those server features like thrust upon you. Yeah, like a good example of that is...
I mean, even Remix in their loader pattern, loaders are server only. They only run on the server, right? For us, that's not the case. Loaders run everywhere. They load on the server, they load on the client before you navigate. But if you do want to run something only on the server, that's where you reach for a server function. So you can create a server function and then we will guarantee that it only will run on the server during SSR. Or if you're on the client, it will make an RPC call back to the server to make sure that it runs that logic there. Nice. And how do you define a server function? Is it in like a somewhat...
familiar way like use server like a pragma like that or like yeah we have kind of two flavors the the first base layer of support uses the use server directive that you're going to see almost everywhere. Like you'll see that in React because they're trying to make it a standard thing. You know, like it's a bundler feature, like use server. We support that. So if you want to make a function and just put use server inside of it at the top, little string literal directive, that will work. We'll extract it and put it on the server, do a little RPC. That works. You can do that. But that's not what we recommend. Mostly because it's lacking. It lacks a lot of features, a lot of things in my opinion. So if you've ever tried to do like validation or middleware, or maybe you have a server function, but you want to wrap it with some client-side functionality too.
It just becomes unwieldy because it's this function that gets extracted and the lines between client and server get really blurry sometimes. And it's like the implementation gets a little blurry too. Like, okay, so when I call this function on the client, what is exactly happening, right? It's, okay, it's creating a fetch. It's doing a fetch call to my server. What kind of fetch call? Are there headers involved? Can I modify those? Is it a get or a post? You know, is it just sending raw response back and forth? Is it doing serialization? Because there's a lot of questions around like, well, can I send maps and sets and dates and things like that? And, you know, will it get?
Could I use SuperJSON with this, right? And when you talk about those features, like the use server directive kind of is unwieldy. It's not fun to use. So we created a primitive for 10 stack start called create server function. And if you've ever used TRPC, it probably will feel a lot like creating a TRPC procedure or mutation or query. So you call create server function.
And already inside of there, you can start customizing to say, this server function should use the method get or method post. So you can start customizing things about how is this going to go back to the backend. You can also start adding middleware to that. So you can chain off of their dot middleware and pass an array of type safe middleware functions. And middleware can not only change and read the payload and the result that you're getting back with a server function, but there's secondary channels on top of that network IO for context. So middleware can even send context between the client execution and the server execution and back again to the client.
without you needing to worry about passing any of that information to the call site. So for instance, we helped Sentry create a middleware for server functions that does full observability from client to server and back to client again. And all you do is add a global middleware and every single server function now has observability in it, which is way cool. You can use it for authentication and things like that. And then there's also validation, which is where trpc is a really big one, like trpc.
we're very type safe first, right? And type safety, as soon as you cross the network, type safety is kind of fake. Unless you control it end to end, which I mean, if you're doing full stack, you could pretty much guarantee like that most of the time it's going to be like, if you just share the types, you're going to be okay. But we wanted some extra security around things. And so we added first class validation support for server function payloads. So what you can do is you can say dot validator, and you can pass any standard schema compliant validator. So Zod, archetype, valibot, or you can just write your own if you want. It's just a function that takes input output with types. And you can actually do runtime validation. And you can also say, so validation by default only runs on the server. But if you wanted to, you could turn it on for the client too and get early errors from the client.
That's what I was going to ask is if it was just on the server or if it could be on both. And that sounds amazing. A question I have on that with the validator. So like if you have something like you're using, you know, the Zod validator and passing in your schema, I assume it's giving you some kind of like standard, like it's going to throw some kind of standard error then. And then you handle that in a pretty standard way across everything. If you use Zod and it throws. So if it's server only, we have a serialization utility behind the scenes that's making it so that we can serialize basically anything from the server back to the client. So when it throws on the server, we'll take that error. We'll package it up. We ship it back to the client and we'll re-throw it on the client and you get to respond to that Zod.
error however you want okay nice so and you can respond on both sides too yeah if you if you wanted to so on the on the server side the valid the base validator can throw and you can kind of wrap that in a catch if you want and say oh we'll do some extra server side logic here if we want the default is that if it if it doesn't validate correctly on the server it'll just go back to the client so and what's cool about that is validators by default are server only so if you use zod in a validator or something like that we actually rip zod away from the client package so even though you're defining these functions right inside of your SPA kind of isomorphic code, the packages that you use inside of the server handler or like the validator, they get ripped out of the client so that you're not shipping ZOD to the client, unless you want to. You can just turn on client-side validation too, and then we'll ship it. Got it. But then on the client, it's giving you those ZOD errors or how is that? Yeah. So on the client, what happens then is we will run your validator client-side before we send the fetch request out on your payload. Okay. So it'd be a different validator. Yeah. Well, no, it's the same validator for now. We have a to-do item to make it so that you can...
customize and say here's a client validator if you want to do that we haven't had anybody ask for it yet but it would be a pretty simple change but yeah that's the idea it's very we want it to be like anything you can catch on the client do simply now you know skip the network io otherwise just send it to the server so now speaking of type safety one of the big features that i see come across and this might be more of like a 10 stack router thing and a 10 stack start thing because and correct me if i'm wrong but the big difference obviously is like the server side functionality of 10 stack start but then also like there's file-based routing within that is that true so the router itself has file-based routing if you even if you don't use start okay So that's just part of Tanstech router. Yeah, just part of Tanstech router. So the router itself had nothing to do with server side, anything, but just the router itself has a VEAT plugin and a CLI. And in fact, it even has an RS pack and web pack plugin as well. So you can run these plugins and we support file-based routing. And those plugins are there to give you like the full breadth of type safety that we can offer. File-based routing is actually the best way to get that. Otherwise you end up wiring a lot of things together if you use code-based routing. Yeah, for sure. Now, I want to dig into that a little bit. Just like, what does it mean to be a type-safe router?
Because I see that touted as a huge feature. And to be honest, I haven't dug into it enough yet to fully understand that. So could you explain that to me? I think the best illustration of what we mean by that is if you go to any example or pretty much any application that's built with TanStack Router and go look at the route definitions, go look at creating a route and using route APIs, and you tell me how much TypeScript you see in those files. And I'll answer that for you. It's probably none or maybe just a little bit. If you have decided to abstract some things on your own, you got to, you know, make your own function signatures or whatever. But for the most part, like you can just write with 10 stack router and never need to cast anything or write type code at all or annotations. You never, yeah, you never have to like narrow manually. So it honestly looks like you're just using JavaScript, but it is 100% type safe behind the scenes because everything is inferred.
And what we mean by that is there's a big difference between libraries like Next.js and React Router that they're written with TypeScript and they do have types, but most of the time you need to remember to put those in there. There's some step involved where you need to get involved to some level to make sure that things are going to be type safe. Like providing a generic, something to a generic. Yeah, providing a generic or even with React Router's new stuff, you have to remember to import the types. and then grab the right types off of that file and put them where they need to go. Or even there's like Next.js and Remix, they both use like a link building utility where you have to remember to use the utility. And the bottom line is that these other routers that aren't type safe, they will allow you to write unsafe code. And I mean, that's fine. They've been around longer than us. They need to support that. We could have done that too. I wrote a router called React location that allowed you to write unsafe code, but I didn't want that.
Not only do we make it really, really easy to just write type safe code, but we also make it somewhat difficult to write code that's not safe because it's just inherently built into the entire architecture of the router. From the minute that you define your router and your routes and start going down into components and loaders and things like that, search parameters, everything is fully inferred. And all of those generics, I mean... If you just want to see how many generics we have in 10 stack router, go look at the source code for 10 stack router. And you'll see some of our functions have 20 or 30 generics being passed around, which is fine. You know, we we're taking on that complexity so that you don't have to. And what you get is a system that even for junior developer or somebody who's new can come in and get the docs and, you know, use autocomplete and write code that essentially guides you to the happy path, discourages you from making mistakes without you needing to even remember, oh, I need to.
make sure that I cast this as type save. Or I need to make sure I remember this generic. Or I hope I'm importing the right file here or something like that. So I gave a talk at UtahJS last year that was around TanStack router. And it kind of went over all of the different ways, kind of a long form answer to what you asked. And what is the difference between writing something with TypeScript and writing a type safe system? And it shows you firsthand like, oh, this looks type safe, but it's actually not. And let's show you why. So I would recommend.
going and watching that video if you're interested on that topic some more. Yeah, for sure. And this is why the type system in TypeScript can be so complex is so that you can hide away a lot of that advanced type safety from end users and they can just benefit from it. And I won't lie, it's really grueling work. I started the adventure of type safe routing four years ago now. In the first two years, I didn't even write any runtime code. I was just messing with types and trying to figure out how could I even architect this in a way that wouldn't require crazy, crazy things. And at the end of the day, I found a way.
And after we had exhausted every possible avenue of doing this without language service plugins or massive amounts of code generation, we had done everything we could with the native TypeScript features. Then we went in and said, OK, how can we make it a little bit better now? And that's when we added one file that does some code generation. And that's it. That's what the plugin does. It generates one file that's just creating some shortcuts for TypeScript. One of the most interesting things about type safety is that TypeScript has no idea what a file is, like in a file system. It has no idea about what file you're in or, you know, like the hierarchy of your file system. And that's a very important thing if you're doing file-based routing. Yeah. For like subroutes and things? Yeah. Nested routing. And so we had to come up with a way to teach TypeScript about the file system.
that was performant and lazily evaluated and performant enough to scale to tens of thousands of routes. that wouldn't crash the TypeScript language service, you know, and we did it. Christopher Herobin is really the TypeScript junkie who's behind a lot of those performance hacks. He's a very, very smart person. We got really far, but he's the one who came in and has really put on like the last buffed out polishes on the type system for 10 stack router. Like I proof of concepted it and I, I made it work and I made it work, right. He's making it work fast. So nice. Nice. So you mentioned working on just like pure types for a long time without actual any runtime code. I'm curious, like,
Did you use any way of like doing automated testing to ensure those types were correct? Or like, how do you, how do you approach that when you're not actually writing runnable code? Well, I mean, if you're just writing just pure types, you can go really, really far without needing testing because something will just not compile or break if you're doing it wrong. Yeah. So TSC is your, your test. Yeah. And at some point though, it gets to be big enough to where you need to guard against regression. So when we were just building fresh, it was just like, yeah, TSC is good enough to like get this, to check ourselves.
But then when we say, okay, we figured it out, solidified it, we needed the tests are more for like regression catching. We just use the test and we write our own .d.ts files. And we use the tests TypeScript stuff to say, you know, expect this type to equal this type. And for the most part like that, not for the most part, it works great. Yeah. So we'll go through and we'll, we'll change the types of fix bugs or whatever. And it will say, Hey, you know, like you're, you're, you have a public type contract that you're breaking. We don't do that for like.
private internal types. We only test public types so that we can go in and mess things around and re-architect the types if we need to, as long as we have those outer contracts, we're good. Yeah. And that's exactly why I was asking about that is like, I'm kind of in the mindset of thinking about the developer experience and specifically, like you said, not regressing it. And so having like a way to ensure that, you know, this is not just going to give you some weird type or some like unknown or any type, like it's going to be what it always was. And yeah, we have extensive type testing as well. So just for router, we have over 200 test suites that run.
Just for like all the packages in router, it's a lot, which is a stark contrast from about a year, about a year and a half ago, we had zero. So big props to my team. They're much better at writing tests than I am. So Sean Cassieri and Manuel Schiller are like, and Chris, Christopher Robin on the type side, but like they're all much better developers than I am. Another question I have around router and 10 stack star. Those are both in the react ecosystem, right? Are there plans for them to kind of follow other 10 stack projects and kind of abstract themselves from react and be more multi framework supported? So I was actually on stream about a week ago.
with Ryan Carniato, we officially announced Tanstack Solid Router. Oh, wow. Cool. So that's already out. Fully tested, passes all the tests. We got the sign of approval from a lot of the Solid team. In fact, Burke and I think Burke, his name's Brindley. I always knew his screen name is Brinnells. But Burke and Brindley from the Solid JS team, they really liked Tanstack Router and Start. And they only started on it like three and a half weeks ago. They're like, hey, let's write an adapter for Solid. They threw in the test suite and they just started cranking away, passing tests. And then they're like, we're done.
I was like, what the heck? So we launched tan stack router for solid last week and it works great. And then I just got a message this morning from, let's see, I want to double check who it was. It was from Brindley. He's like, hey, so just so you know, tan stack start for solid is pretty much working. That's amazing. Are you joking? So, I mean, there's some, there's still some things to like polish up, but it's incredible. So we actually, we named it tan stack start because I knew that router was probably going to go to other frameworks, but I didn't know if start would.
Well, just a couple of days ago, Manuel Schiller on my team, he's like, hey, by the way, we're renaming 10stack start the package to 10stack react start. And I was like, oh, oh, oh. And he's like, yeah. So there's going to be, there already is an internal package for at 10stack slash solid start, which can be confusing because there's also solid start, but it's a work in progress in terms of like how we're managing. those two projects, like SolidStart and TanstackStart, we are working very, very closely with the Solid team. They are in the Tanstack org. We're in their org. We are cranking on some really cool stuff right now. So SolidStart is actually already using a lot of the new plugins that we built for things like server functions. So the stuff that I told you 10 minutes ago about server functions, 15 minutes ago, we built our own plugins to do that in a way that's like framework agnostic. So you could do it across React or Solid or whatever. So it's been validating that that abstraction, like on top of like server components and things that are more React specific.
Yeah, so like the use server directive. There's a package called like tanstack directive functions plugin. It has nothing to do with React. It's just like, set it up. You can inject your own runtimes into it that can call into your own code. And we made it like, I mean, in tanstack fashion, I made it extremely like inverted on control. So we put it in and then the solid team, Burke and Bradley were like, oh, let's replace the one in solid start with this. So they swapped it out. And then even Brandon, who made analog JS, he was like, oh, I'm going to swap mine out too.
And so he swapped his out to use this server function plugin. And then Dev Agrawal, he's like, oh, I'm doing something for signals. I'm going to use this for signals too. So like he swapped it out for signals because it's a directive plugin, not a use server plugin. So you can actually support other function directives if you want to extract them out, which is kind of nuts. I think he's playing with something like use socket and then it like it extracts it out and you can do like custom socket logic on client and server. Like it's cool stuff. So needless to say, we're working together very closely. I don't know if solid start.
and Tanstack SolidStart are going to merge someday. I'd say it's a possibility, but it's more likely that they just kind of take on different roles where SolidStart might be just kind of the example framework to say, hey, this is how you can do a router agnostic. full stack framework on top of solid check it out right and it's it's scoped down a little more kind of like this is a this is a good way to like learn about it or just you do something simple and then tan stack solid start will be more of like a full-fledged product that you'll say okay we really want to use solid and we really want to have like a full-fledged like meta framework that's going to you know benefit from extra stuff so maybe we'll use like tan stack solid start so that's probably where it's going But we'll just have to see. We're all just kind of playing it by ear. It's just like, let's just go out there and build cool stuff that we can share and see what happens. So, so far, so good. I'll say. That's amazing. You've had this ecosystem of TAN stack products for a while, right? Query, form, table, and now a router and a whole framework. Do you see them working together as an ecosystem where developers could maybe pick up and build pieces with these individual pieces and build on top of them to then support these more top-level, solid, or React framework-level things? I mean, I can say that's already happening. It's already happened. Yeah. Because...
We have framework adapters for all of the other libraries already. Some of them are more mature than others. And a lot of that is just based on the popularity of the framework, how many people use it, right? Like spelt table. needs some love, but there's not a lot of Svelte devs out there who are also like, oh, I'm going to use Tansac table and let's, and then let's, let's make it better. Right. I mean, so some of it is just talent there, but the adapters are there and they work. You can wire them together if you want, or you don't have to. I definitely like our goal is to stay away from some kind of like monolithic structure where everything only works well together. And they only like, they have better support for each other than they do for other things. Like we want to make sure that.
It's more like Unix-style composable blocks that work good with everything. If the right APIs are there designed with good inversion of control, they should work good with everything. So actually, two weeks ago, Jack Harrington built a new tool called Create TS Router App. And it's a drop-in replacement for Create React App. Really? Yeah. Other than some differences between Webpack and Modern Vite. So it doesn't support old school ES5 output and stuff like that. But for all intents and purposes, it is a drop-in replacement for, oh, I was going to use CRA. Oh, I'm going to use CTA. What's cool is you can just say NPX create TS router app. It drops in, and it looks exactly like CRA. But then behind the scenes, you go to that main app file. It looks exactly the same. But if you go up a level to the main entry, you'll see that we've already set up 10-sec router for you.
just with a single app, you know, or a single route that's just going to this one component. And you're like, well, what if I didn't want code-based routing, which I want file-based routing? Well, then you can add a dash dash file router to the create TS router app, and it will give you file-based routing. And then you're like, oh, what if I want to use solid? You can do dash dash solid now, and it will do create react app essentially, but with solid instead using 10 stack router for solid. And then going even beyond that, we have add-ons.
where you can say dash dash add-ons, and it brings up this select list where you're like, oh, I want to add Tailwind, Shadzian, Sentry. I want to add Netlify stuff, like a demo for Netlify things. You can just check off a bunch of stuff, and we will install them, give you demo pages for them, and wire it all up for you. And then we also have templates too, which is Create React Hub had templates as well. But like we have a template called TanChat that's coming out. It's like, I think it's an anthropic, you know, hey, here's just like a really demo fun TanChat thing. Sentry has an example that you can trigger, you can manually trigger errors in a couple of different places and watch them come into your Sentry dashboard live and with full stack observability. It's really cool. Not that it matters. I'm just kind of like thinking, but I know that like with Create React Hub, it was kind of doing like this weird managed thing where it was, it wasn't exposing you directly to webpack, right? It had like a minimal configuration.
Yeah, like they had their own package called create. React scripts. React scripts. Yeah. No, we're not doing that. I think that's dumb. So I mentioned to somebody that's almost like pre-ejected in a way, but not in a way that Webpack was where it's like now you have this huge Webpack config to handle. Like really, there's a Vite.config.js file sitting there and you're like, oh, it just works because we're using the React Vite plugin and it works great. And if you want to go in and add anything you're doing with Vite, you just add the plugin, you do whatever, you know, and it's like you can still upgrade Vite and upgrade your plugins and upgrade the tech.
even though you're customizing things right so it gets away from that like you know you're locked into this like we're going to fully manage everything for you because we don't trust you i mean that's essentially i mean with webpack there was good reason around that like i wouldn't trust a lot of people to do that either but with v nowadays like i trust people with v like go ahead like there's there's only a few things you could probably do that will mess things up terribly and you can always just roll it back or or whatever so no that sounds definitely like a better approach and that's kind of why i was asking because there's such a great ecosystem of tools like within v itself that hiding that away or making that more difficult to adopt anything else like is almost a detriment but it sounds like You're obviously doing the right thing. Well, what's cool too is it works with start. So start is currently in beta, right? And for now, for today still, we use Vinci as like a little runner. So you say like Vinci start, Vinci build or whatever. I'm actually working on Dvin. Internally, we call it DaVinci, which is DaVinci. But we're working on just using Nitro and Veet directly, like a Veet plugin. We wanted to do that from the beginning, but we just needed to move fast. So Vinci let us do that. But now we're to the point where we're just getting rid of like superfluous stuff. And we can talk about that. We don't need to.
But anyways, if you add dash dash start to that create TS router app command, you'll get a start app. And it will actually look exactly the same as create react app, but it's server side rendered, has routing installed already. It's pretty cool. Yeah, I'm obviously biased, but I think it's the best way to start a new app these days. Nice. Yeah, I'll definitely have to check that out because I'm constantly creating new apps. You did mention tan chat and that got me thinking about AI. And so I wanted to ask you what AI means to you kind of day to day. Like, are you using it your day to day development or like what does it mean to you? Yes, I pay for chat GPT.
And I use that all the time just for personal stuff. And I mean, I basically use it instead of Google now and actually can't remember the last time that I used Google to like research something. I use Google all the time to like search for a site that I need, that I need to go somewhere, you know? So it's, it's more, it's become more like AOL. was it AOL keywords or something? Yes. Remember those? Unfortunately. Yeah. But Google now is less like a research tool for me or like a question tool. I just send all that to OpenAI ChatGPT. And then for programming, sometimes I'll use GPT because it's just option space and it's just kind of there. But I'm using way more cursor lately. Really like cursor. I still think it's better today than what Copilot has and what Windsurf has. They're all really good.
but cursor is just amazing. And I don't even use a lot of the agent stuff for the kind of code that I'm writing. There's not a lot of prior art out there. So I don't really trust agents to go and write the kind of library code that I'm writing. When I'm building an app or a site or like, you know, templating some tailwind or something like that, like, oh yeah, like stick an agent on that and let them write kind of the grunt work stuff. But for me, it's way more of a utility to say, to have cursor sit on top of like the Tanstack router repo and see and index all of the patterns and type utilities and things that are inside of our entire code base. And then for me to go and try and write a new feature, it's helping me remember like, oh yeah, you have this API.
I'm going to use it. You use this pattern here. Let's use the same pattern here. And it's frighteningly smart at autocomplete and just like taking my ideas of like, oh, this is how I want to architect this thing. And it just kind of like tries to read my mind. And because it has enough context in my projects, it usually does. And I wouldn't say for me.
it's not necessarily coming up with novel ideas for me. Instead, the two places that I think that it does help is it just helps me go faster. So it gets my ideas out faster. I don't have to type everything. I mean, even Copilot was great at that, even if it was one line at a time. So it just helps me go faster. And also it helps me when I brush up against areas of programming or other APIs or services that I'm not super familiar with. I'll kind of be like...
Hey, I think this is what I need. And then it will kind of autocomplete and I'll be like, but that doesn't work. So it's almost like a learning tool as well to like learn fast to say, Hey, you know what? I don't know how this node streaming API thing works. So I'll just be like command K, write me, you know, this logic, but I need you to use node streams. I need you to convert them to web streams. And then I'm watching it go. And then I'm like learning as I use it too. Yeah. Yeah. And I mean, that's a fantastic way to put it. Like we're no longer really in the world where we're staring at a blank, a blank file and like figuring out how to get started. Like you can just throw something out there and.
you're good enough to know this is close or not close at all and kind of refine it from there, either with AI's help or manually. That's how I'm approaching it as well in my day-to-day work. It's kind of like a lot of managing context. That's a great way to approach it. And I would also say on top of that, there's always going to be discussion about, you know, is AI going to replace me or whatever? I get asked that a lot in like private DMs or whatever. It's like, are you worried about this? And to that, I would say, look at how much code you're writing that the AI is currently unable to do correctly, right? If that is close to 0%, then you're going to be replaced soon. If it's 50%, man, you're fine.
You know, like if 50% of the code you're writing is impossible for an AI to figure out how to do correctly, you got good job security, you know? And that's for me, like if I ever get to the point where like, oh, I'm not writing it, you know, it's like, oh, AI could write all, you know, design me a type safe router repo to be used by every, everyone and everything, you know, in their cat and dog or whatever. As soon as it can do that, like I got to evolve, you know? So that's usually a good measuring stick for me. And, you know, when you, I think when you use that measuring stick, there are actually very few people who are truly just YOLOing.
some AI code out there without even being able to say, oh, I got to test it and try it and debug it. But it's getting there. It's pretty scary how good some stuff is that can one-shot things. And you mentioned prior art and how it's not super useful for that. There's not a lot of prior art in what you're doing. And I think that coming at it from another perspective, you are in a unique position in that you're releasing a framework within the last year where there's not a lot of prior art for these models to be trained on specifically. So I'm just curious.
you know, Next and Remix and all of them do have that prior art. The AIs can have a little bit of context to help, but they won't know a lot of the new features, but it's like a feature thing. If I ask an AI about 10 stack star, I haven't, by the way, but if I did, it might not know much of anything. And just like as a, as a author of a new like framework and paradigm, I'm curious if that's something that's on your mind of like how to approach that or how to help developers get over that hump of my chat GPT is not going to be able to help me create a server function because it doesn't know what that is. Yeah. Some of that is just time. Like time will heal that to some extent, you know? And I also think that there's like, there's entropy.
that needs to happen for us and i'm willing to be patient for that there's also atrophy for you know outdated and old patterns for other frameworks as well like now there's you can go to next and say hey or say hey write me a next app or write me a write me a react router seven whatever and you're going to get pages router and you're going to get react router six or or remix or something like that so there's challenges all around i would rather have the challenge of hey you know they haven't indexed us yet they haven't been trained on us yet and you can use tools like cursor uh to point your stuff towards our documentation or we also can't even remember what it was called because that's how new it was but it's it's like a protocol for a ai tool protocol what's it called mcp mcp what's it called it's called the model context protocol so we are adding support for tan stack to be like an mcp service so that you can point your your ncp compliant or or supported thing at tan stack and say okay tan stack is now a tool like a utility of knowledge you know it can use our database as a as a way of teaching how to do better stuff so looking at things like that i just think i'm not necessarily worried about it mostly because the same things that i would be doing to teach an ai are the same things i'm going to be doing to teach users i have to we have to make sure our documentation is outstanding plenty of examples get more and more people writing projects with it that are open source and public that use the good patterns
resisting breaking changes resisting you know stuff like that so it's almost okay that they're not indexing us yet because it's still beta for start you know and some things some things might change just a little bit you know so i'm not worried about that though it is hard even for me i get into the source code of like 10sec router and i'm like hey i need to do this thing with ai because there's no prior art it's like starts bringing in react router apis and next js apis because that's all it has you know and i'm like okay you gotta stop yeah yeah and another thing that i've seen people do i've kind of started to see this on like doc sites and things is like here's a cursor rules that can help you like work with our project so maybe like something like that too but i also think the mcp thing that's so new like i think i only heard about it because i just started playing with uh claude code and i think that that can do something with it but yeah this is changing so fast and it sounds like you're on you're on top of it so that's awesome too but also not worrying about it because it's not really needed yet cool i just kind of message my wife really quick um Yeah. Is there anything else you wanted to bring up or talk about today, Tanner? Oh, let's see. I'm excited about DaVinci. We're going to be using Vita Nitro directly, and a lot of that includes the new environment APIs. So we're going to have in React Router, they're experimenting with this now too. It's a hard upgrade path. It's a different world, like the new environment APIs, but they're very valuable because you can run things, you can run like a native Deno kind of environment, or you can run WorkerD if you're going to go to Cloudflare on your machine and kind of replicate that environment that you're going to be deploying to.
on your own machine, which is really neat. We're working really closely with the Nitro team to make sure that we can support as much of Nitro as possible. And it should be almost everything. As soon as we can get rid of Vinci, we're going to have support for deploying to over 30 deployment destinations right out of the gate. And you'll be able to write server-side code once.
and literally just migrate between all of them because that's what Nitro is. It's like the server-side toolkit that kind of goes everywhere. So as long as you're using the Nitro APIs, you could ping pong between like Netlify, Vercel, Cloudflare, whatever, and not have to change really anything. If you do it right, all you have to do is change a string from like, you know, Vercel, Edge to, you know, Netlify, Lambda or something like that. And Nitro just takes care of the rest. So I'm really excited about that. I'm excited about the SSG stuff. That's a big reason I'm doing the move to Nitro in V is because I want more control.
I want you to be able to ship SPA mode, like true SPAs with Tanstack Start, where you can pre-render HTML documents as landing pages that are kind of like PPR, where they're like, as much of the page as possible is already rendered out. And then where you want to start your dynamic stuff, you can have these dynamic holes that fill in as soon as you mount. And then obviously, this will probably be after we do 1.0, but we will bring server components to Tanstack Start very soon. They're just going to be a server function that happens to return React code. Yeah, it'll be really simple to use. I think it's going to be refreshingly simple for people to use, even more so than like React routers, React server components there. They're doing almost the same thing, but you can only use them inside of a loader. We're going to make it so that you can use them anywhere that you can define a server function, which has nothing to do with the router. It's just, so I mean, literally, if you just wanted to have server functions and React and no router, like you could, if you wanted, like that's a weird, it's a weird world. It's almost like what Waku is, but it would be totally possible. Future looks very bright. I'm very excited about all of this. Yeah, me too. So where can people find you? I'm usually on Twitter.
at Tanner Linsley. If you want to get more personal, you jump in Discord. We can talk in Discord, share code. Yeah, mostly in those two places. I don't stream a whole lot. I prefer just to work.
But yeah, I mostly hang out on Twitter and in my discord. Yeah, I'm very open to like people who want to DM and chat and whatnot. So if you have cool ideas or feedback or just, you know, as long as you don't want to shout at me, we can chat about whatever you want. Darn it. Okay. No, thank you so much. And thanks so much for coming on and sharing all this. I'm, I genuinely learned a lot about 10th X star. I didn't, I had no idea about the solid variant of that. So I'm very excited to go look into that. And 10th X, all it starts probably coming very soon, like in the next couple of weeks. So awesome. Well, it'll be beta just like the react version. So yeah.
nice well thanks so much tanner and we'll catch you next time thanks