Will React Server Side components change how we build React Applications?
What does this mean for libraries such as NextJS?
Recently, the React team announced an experimental feature of React called Server Components.
These will allow developers to combine the rich interactive experience of client-side apps with the improved performance of server rendered components.
To sum it up quickly, React Server Components are always rendered on the server. Such components will fetch data from the backend, so the rendering will be colocated with the data that’s being fetched. In case for updates, the components are refetched from the server and merged.
There is a lot of hype with this new feature, though it comes with a big question: Haven’t we already tried this before?
This has been done with PHP or RoR etc. and React Server Components are inspired by them, however, the aim here is to provide a solution that us more flexible than the the existing solutions and improve the reactjs developer’s experience.
There are many tools and strategies to reduce the impact of not being able to serve apps that are fast and small in size. Tools and rojects like GraphQL. And for many web apps, they can work very well. In the end, they are only patches or solutions that greatly increase the complexity of our app.
Thus, Facebook joined forces with other teams such as Google Chrome and Next.js to research and build React Server Components – a core React solution that works without the need for frameworks.
It is expected that server components will be a new hype for 2021 and they will be adopted very fast, so look forward to a lot of upcoming experiments and new updates.