Channel
Interviewed Person
Theo Browne (t3dotgg)
Vercel just shipped "use workflow" and people are mad... Thank you G2i for sponsoring! Check them out at: https://soydev.link/g2i SOURCES https://tanstack.com/blog/directives-and-the-platform-boundary https://www.youtube.com/watch?v=sneufVyPfiY https://x.com/rickhanlonii/status/1981523063415120258 https://x.com/tannerlinsley/status/1981388215161634821 Want to sponsor a video? Learn more here: https://soydev.link/sponsor-me Check out my Twitch, Twitter, Discord more at https://t3.gg S/O Ph4se0n3 for the awesome edit 🙏

Theo - t3․gg
Interviewed: Theo Browne (t3dotgg)
Use client, use server, use workflow, use step, use convex, use cloudflare, use Verscell. What's going on with all of these directives? Why is everyone freaking out? Well, as usual, it's our favorite stirer of drama, Verscell. They just announced the workflows SDK, and everyone is getting upset because of this particular slide and what it means. Directives are here to stay, it seems. If you're not familiar with directives, it's a string that you put inside of your JavaScript code that is used to indicate specific behaviors. These started with the classic use strict
which was a way to try and change some behaviors in JavaScript to deprecate some not so great things and let you as a developer opt into the new behaviors. It hasn't been used very much since then. Verscell's kind of commandeered this alongside the React team in order to sneak behaviors into the framework. The big case for this is client and server components where you're dictating what code runs where. Use server is a way to say this function runs on the server and when you call it on the client it's effectively an API call to the server and use client says this code
and the code in this file should be bundled up and sent to the client so that it can run there as well. So what are use workflow and use step? These are attempts to make more durable executions for your JavaScript code which is a very exciting thing. I can only tell you more about it but first we have to use sponsor. I have an incredibly unfair advantage as the CEO of my startup the ability to hire. Most companies don't have access to thousands of engineers ready to go to work on whatever time frame and whatever scale you need for your projects. The only way to plug that gap that I know of is today's sponsor,
G2I. These guys get hiring. I wish they existed when I was hiring at Twitch. They would have made my life so much easier. They have a network of over 8,000 experienced engineers working at real companies with experience all over the industry that are ready to go and work for you. Their engineers are already up to date on the latest with AI tech and are ready to work in pretty much any stack you can imagine. Their web interface for finding engineers is incredible, too. You can just select the technologies that you want to work with and get a list of people that make sense for that. You also can write your own interview questions that will be sent to the candidates who will then film a
video response that you can click through in their UI to figure out who you think's the best fit. From interview to first PR merged, their goal is to make it happen in a week, which is crazy. If you've ever had to hire before, that usually takes months to get done. And if you think this is just for like small companies or crappy one-off engineers, don't. There are big companies using them. From web flow to one password to even meta. Yes, really. This shop monkey quote still blows me away. We've made 17 hires in the last 60
days. We'll never go back to hiring the old way. If you're tired of hiring in the stone ages and you want to do it right, check them out now at soyv.link/2i. There are going to be a couple steps to this one today. pun not intended, but we'll go with it. A few things we're going to need to talk about as we go through. First, of course, what is the workflows SDK? Two, what other options exist? And of course, number three, why is everyone so upset? Because a lot of
people are upset. In particular, Tanner Lindsay, who as you guys know is a good friend and one of the smartest people I know. He has feelings and I actually don't think I agree. He did write a blog post which is one of the many things we'll be going through. I have a bad feeling this is going to be a long video. So, let's start at the top level of what the hell are workflows and what is this workflow SDK. The simplest way I can put it is it's a way to take a function in JavaScript and break it up into pieces that can rerun over long amounts of time and execute in ways that you wouldn't normally execute a function. Traditionally, when you write
JavaScript, it goes line after line after line calling whatever functions you have inside of it. and it will probably hit things throughout, especially if you have a lot of async await calls. Like what happens if this fails? What do you do? Do you go up a level and retry the whole function cuz like we got the user fine, we generated the email fine, but then the send failed. Do we retry at the top level and go through it again? Do we maybe write send email in a way where it retries itself three times? What if we wanted to send another email a week from now? There are so many things that are hard to do when you have these workflows that