Leveraging React Server Components in RedwoodJS
Blog post from LogRocket
In May 2023, the React team released React 18, enhancing support for React Server Components (RSCs), which led to RedwoodJS announcing its support for server-side rendering and RSCs shortly after, marking a shift from its traditional GraphQL focus. This change aims to help developers quickly transform ideas into startups, and the article explores the implications for developing with RedwoodJS, including setting up a simple app to experiment with RSCs while noting some workarounds needed during the ongoing development of RedwoodJS Bighorn. Despite the ease of use of RedwoodJS, developers may face challenges, such as requiring Node v20.10.0 or higher and dealing with the nuances of RSCs, which require a different approach to structuring components compared to traditional frontend React development. The article also highlights the differences in handling data fetching and component state, with Server Cells and Services in RedwoodJS, and discusses current limitations and workarounds for using RSCs in RedwoodJS, such as the lack of Server Actions and challenges in integrating Server Cells in Layouts. Ultimately, while RedwoodJS is not yet ready for production with RSCs, it shows promise as a framework for building fast and easy-to-develop React applications, and it is compared to other RSC-compatible frameworks like Next.js, Waku, and Gatsby.