Sign in

Ryan Toronto

@ryantoron.to
242 followers 32 following 64 posts
PostsRepliesMedia
Ryan Toronto @ryantoron.to · 25/07/2026
nice, that's a great api
010
Ryan Toronto @ryantoron.to · 22/01/2026
Yes 100% Do you have any recommendations for tooling? I noticed I'm getting way more strict about linting rules and even toying with bringing in some cyclomatic complexity and test coverage measures, but these feel like half baked solutions that are brittle (and annoying to others)
010
Ryan Toronto @ryantoron.to · 14/12/2025
that router refresh demo is so good... especially when viewing the code and payload side-by-side. just perfect for walking through how the server can refresh without losing client state.
030
Ryan Toronto @ryantoron.to · 14/12/2025
this is incredible
030
Ryan Toronto @ryantoron.to · 14/12/2025
i think you want a protocol from client->server so you can pass rich objects like promises, maps/sets, tmp references etc from c to s. fwiw under the hood rsc will use json when going from client->server if there are no rich objects, otherwise it uses FormData as a container for the flight payload
140
Ryan Toronto @ryantoron.to · 14/10/2025
FlightServer.lean 👀 lets goooo!
020
Ryan Toronto @ryantoron.to · 23/09/2025
I added parallel and recursive route rendering to Twofold, which kind of blew my mind. It's the first time I've used a React pattern that specifically takes advantage of the two phase server/client render. Wrote about it here: twofoldframework.com/blog/paralle...
twofoldframework.com
Parallel and recursive route rendering
RSC route rendering without waterfalls.
0112
Ryan Toronto @ryantoron.to · 11/08/2025
thanks tom! i really need to give convex try, it looks awesome
120
Ryan Toronto @ryantoron.to · 11/08/2025
thanks! i ran into a nasty bug a few weeks ago when our dashboard was displaying a bunch of "incorrect" information because queries were firing at different times
010
Ryan Toronto @ryantoron.to · 11/08/2025
This post explores how components that read impure data can end up with inconsistent trees, and how React's cache function easily fixes that for you.
060
Ryan Toronto @ryantoron.to · 11/08/2025
React Cache: It's about consistency twofoldframework.com/blog/react-c...
twofoldframework.com
React Cache: It's about consistency
Learn how React's cache function keeps your components predictable and consistent.
3212
Ryan Toronto @ryantoron.to · 03/07/2025
it's awesome. my favorite piece about it is how it flattens all async calls and gives you the mental model of sync execution. uAS+async will always run in order, and each call gets access to previous state even if it was called before the previous call finished 🤯
020
Ryan Toronto @ryantoron.to · 25/06/2025
Process wise I write way more jsdoc comments now. I treat those as future proofing and guarding against any agent that comes into the code base. Also I'm finding tests to be way more valuable these days. I look at tests as a cheap insurance option now.
020
Ryan Toronto @ryantoron.to · 25/06/2025
I find it helpful it on the edges for non-app code. Like "make me a persistent hash map" that I can then tweak/play with. Also it's amazing for autocompleting the current line. But I'm not a fan of huge chunks of app code written with AI. I believe that requires taste that the agent doesn't have.
240
Ryan Toronto @ryantoron.to · 25/06/2025
This switches to the react-server export condition for this import? I like it!
000
Ryan Toronto @ryantoron.to · 18/06/2025
This can be hard to wrap your head around the first time you see RSC. I think it deserves a follow up post!
000
Ryan Toronto @ryantoron.to · 18/06/2025
This is a great question. If you have <Intersection><RSC></Intersection>, the RSC will run on the server before <Intersection> runs on the client. So you end up with <Intersection>Output from RSC</intersection>. You can wrap in Suspense to not block rendering, but it doesnt prevent RSC from running
110
Ryan Toronto @ryantoron.to · 17/06/2025
Sounds interesting... Do you have an example UI in mind for that sort of use case?
100
Ryan Toronto @ryantoron.to · 17/06/2025
New blog post: Composable streaming with Suspense One of my favorite patterns lately has been using Suspense to stream in lazily loaded content. It's perfect for dynamic dropdown menu options. twofoldframework.com/blog/composa...
twofoldframework.com
Composable streaming with Suspense
A look at two real-world UIs that rely on streaming with Suspense.
1517
Ryan Toronto @ryantoron.to · 12/06/2025
Great great article, thanks for sharing I know it's a bit boilerplatey, but personally I've found the setState during render (increase/decrease example from docs) to work well with derived useStates based on changing props
010
Ryan Toronto @ryantoron.to · 09/06/2025
Really enjoyed this one. Great post and the video walk through is fantastic as well.
010
Ryan Toronto @ryantoron.to · 22/05/2025
They are the worst :( Also the AIs that start commenting on issues and other people's pull requests
010
Reposted by Ryan Toronto
Brooks Lybrand @brookslybrand.bsky.social · 16/05/2025
React Router RSC Preview is now available This brings support for all of React's API in a way that is incrementally adoptable by the millions of React Router apps in production today, but also feels great for a greenfield React Router app remix.run/blog/rsc-pre...
remix.run
React Router RSC Preview
React Router's preview support for React Server Components is now available
37110
Ryan Toronto @ryantoron.to · 18/05/2025
I'm willing to bet in most my RSC apps I'm passing larger objects than needed between server and client, but it hasn't really been a problem so far. Agree with Jacob that it's about education. My 2c is devs need to understand .bind and serialization to do RSC well
020
Ryan Toronto @ryantoron.to · 17/05/2025
I made this to help with hoisting and encryption for inline server functions github.com/twofold-rsc/... Lemme know if you have any interest in something like that for Parcel
120
Reposted by Ryan Toronto
Daniel Saewitz @saewitz.com · 30/04/2025
Server Components Give You Optionality saewitz.com/server-compo...
saewitz.com
Server Components Give You Optionality | Daniel Saewitz
1211
Ryan Toronto @ryantoron.to · 29/04/2025
Will do! Thanks for the nudge!
020
Ryan Toronto @ryantoron.to · 28/04/2025
It's so elegant, been using it for the last few weeks and I love it. Might be my favorite example of a directive because: - Automatic cache keys - Function hoisting similar to server functions (you can close over variables) - Opaque references (passing children doesnt create a new entry)
150
Ryan Toronto @ryantoron.to · 26/04/2025
Thanks Artem!
010
Ryan Toronto @ryantoron.to · 25/04/2025
New blog post on serializing promises in React. Learn how RSC serializes data between the server and client. twofoldframework.com/blog/you-can...
twofoldframework.com
You can serialize a promise in React
Use React to create a promise on the server and later finish it on the client.
2667
Ryan Toronto @ryantoron.to · 22/04/2025
Great post. The squiggly line that splits the server and client components is an awesome UI and makes the code easy to read. Is that new?
170
Ryan Toronto @ryantoron.to · 21/04/2025
Upstanding, trustworthy (the opposite of click bait, gossip) I look forward to your newsletter every week, it's the best way to see what's happening in the React ecosystem
131
Ryan Toronto @ryantoron.to · 17/04/2025
If you're running an RSC server how do handle the react-server condition? 1. start node with --conditions=react-server? 2. run node without conditions, but start a worker with the react-server condition? 3. Something else, like a bundle time thing? I've been doing 1, but I'm not sure it's best
010
Ryan Toronto @ryantoron.to · 15/04/2025
The Async UI Framework Checklist is great
030
Ryan Toronto @ryantoron.to · 11/04/2025
I wrote about building toast messages into an app with React Server Components. Really liked how easy it was to use server functions, cookies, and useOptimistic to make this all come together. buildui.com/posts/toast-...
buildui.com
Toast messages in React Server Components
181
Ryan Toronto @ryantoron.to · 11/04/2025
this is fantastic. we've got a requirement in an app at work where we need to load all the images before rendering the next page. having all that done by react (and tied to a transition) is gonna be awesome
110
Ryan Toronto @ryantoron.to · 22/03/2025
RSC with a form and server action running while JavaScript is turned off
160
Ryan Toronto @ryantoron.to · 19/03/2025
Hey @sebmarkbage.calyptus.eu I have an RSC+MPA question... is there a way to have a <form> that uses a server action directly (so you get $ACTION_ID/REF inputs for MPA), but then after hydration is able to work with client-side code that uses useOptimistic?
010
Ryan Toronto @ryantoron.to · 15/12/2024
Completed this! Ended up releasing it as an open source library: github.com/twofold-rsc/... My first RSC OSS tool, feels good :)
060
Ryan Toronto @ryantoron.to · 10/12/2024
Wow that's awesome! Thanks for trying it out :)
010
Ryan Toronto @ryantoron.to · 07/12/2024
RSC stream feels like it has so many use cases out outside of component rendering... it's like json on steroids.
020
Ryan Toronto @ryantoron.to · 07/12/2024
Next.js source is a work of art. I was wondering how they serialize and encrypt action args and found this: github.com/vercel/next.... Of course they use an rsc stream to serialize all the args into a string... and then encrypt!
150
Ryan Toronto @ryantoron.to · 02/12/2024
Nice, thanks. Additional transition is what allows the setState to get entangled/batched into the wrapping transition from the component? Re-apply action context is nice wording.
110
Ryan Toronto @ryantoron.to · 02/12/2024
Very cool, thank you. This helps and I love reading these threads. If I'm making a component and I expose `saveAction={() => {...}`, is it fair say that it means: 1) Whatever callback you pass in here will be run inside of a transition 2) It can be sync or async Any other rules I should follow?
240
Ryan Toronto @ryantoron.to · 01/12/2024
Made some progress on this! Here's my test suite so far: github.com/twofold-rsc/... This is a little verbose, but I'm pretty proud of this attached test. It turns captured variables into function params.
030
Ryan Toronto @ryantoron.to · 28/11/2024
This weekend I'm going to try implementing this. A plugin that turns a function defined in render into one that automatically encrypts/decrypts anything it closes over.
120
Ryan Toronto @ryantoron.to · 28/11/2024
If you encrypt (or sign) those closed over variables before giving them to the client, then by the time they make it back to the server you know you can trust them. The server can skip auth/validation because if params decrypt they are 100% valid. It's like CSRF for every single hidden form input.
100
Ryan Toronto @ryantoron.to · 28/11/2024
One of the areas where I've changed my mind recently is with server actions + closures. In the past I believed it was too dangerous to close over variables during render because it creates an implicit client param and therefore devs would be better off being explicit with hidden form inputs. but...
140
Ryan Toronto @ryantoron.to · 25/11/2024
I've been thinking about this question a bit more over the weekend, it's a great one. Is the main point of the question to highlight the unique thing about RSC is that it lets you decide where code runs?
110
Ryan Toronto @ryantoron.to · 24/11/2024
Great list, thanks for that
010