Right here, we see the main dashboard with some performance graphs. If we look at the navigation menu, you can see what else is available. We have OpenTelemetry monitoring. There's a section for some GraphQL tools. We have the database section where you can see your database schema in a graph, so like an ER diagram, and we use Prisma as our ORM. By going here, you can see the actual SQL statements being sent to your database.
Next up, we have the mailer integration. So, when you run Studio, you have your own dev time email inbox, so when you work on any features of Redwood where you send emails, you never run the risk of sending test emails out to actual customers, because they will all end up here in Studio. And you can also preview your email templates.
Then we have the RSC section, which is what we're going to talk about today. But finally, I just want to mention SSR, where you get a preview of what your different pages will look like when you share them on social media. And finally, there's just some Studio information at the bottom there.
Before I jump into the RSC section, I just want to make sure that we're all on the same, like, kind of baseline level of knowledge about React Server components. I mean, this is React Advanced, and you have all decided to listen to a talk on React Server component dev tools, so I guess you have some sort of idea about what React Server components are. But just quickly, React Server components is a way to execute React components on the server in a server context. Like, we've been doing React components on the server for a while with SSG and SSR, but that has always been in a client or a browser context. And all those components are then also sent to the browser and executed in the browser as well. With server components, they're only ever run on the server in a server context. And then the result of running those components is sent to the client with this new format known internally as Flight, but more commonly known as the RSC payload. It's a new-aligned, delimited, JSON-ish kind of format.
So now that you know that, if we go into the first item there in our RSC, part of the menu, we have the cache. And right off the bat here, you can see this RSC payload format as the cache values. The cache key, I don't know, it's too small for you to see, but the cache key is the URL on the page that you're visiting, and the value is, as I said, the RSC payload. Caching is difficult. Caching on the server is difficult. Caching on the client is a little bit more difficult. Cache invalidation on the client is super difficult from a framework perspective. So I knew that as soon as I started implementing caching support on the client, I needed to build, or I wanted to build some dev tooling around that. So that's why I added this. Honestly though, we hope that we can ship without RSC client-side caching.
Comments