Enhancing your Static Sites with React Server Components
I was extremely scared for this talk. It was one of the first talks of the conference, and I was running late. I had just finished my slides the day before which took a lot of effort because of all the code and animations in it. I still wasn’t sure if the content and the flow were right. Thankfully, the talk went smoothly and the audience liked it! Even I felt it went much better than some of my other talks and it covered everything I had in mind after watching the live stream later that day.
About the talk
In this talk, I went over how React Server Components fit in the world of static sites. Static sites seem to have fallen under the radar, especially in the React community. With React “server” components, Next.js and Remix going all in on server-rendered sites, and the inactivity of Gatsby framework, it feels like React is no longer a library of choice for building static sites.
Having played around with React server components in some of my side projects, I felt there was a misconception in the React community about what this new feature was. A part of it
has to do with its name. React server components in a nut-shell is a way to run async logic before UI is sent to the client. This async logic can be anything from data fetching to heavy
computations, build-time processing, and more! What’s interesting is that a lot of what React server components unlock is closely related to what the static site community has been wanting
for years. React Frameworks like Next.js and Gatsby had their solutions for data fetching and build-time processing but they always had quirky limitations of being restricted
to page-level components, or in the case of Gatsby one occurrence of useStaticQuery()
hook per file!
Do give the talk a watch and share your thoughts with me on
Post-conf thoughts
I met some of my old friends and many new folks at React Nexus. From the speakers to the audience, I had interesting conversations with almost everyone. It was humbling to know that
the community follows and appreciates the work I do. Huge thanks to
References
These are some of the finest resources to understand React Server Components. I also found them really useful for preparing this talk.
article by Josh W ComeauMaking Sense of React Server Components talk by Dan AbramovReact for Two Computers