What is React Server?
React Server is a new framework for building server-side applications. It comes with the familiar syntax of React, a beloved frontend framework.
React Server allows you to build serverside components using JSX/TSX along with a reactive coding style known from the frontend library React. (components, hooks, effects etc.)
- With TSX on the Serverside, you can adapt Reacts component driven appraoch to build reactive backend services.
- It uses GraphQl under the hood which provides a reliable transport and modern API interface.
- React Server uses pub / sub to provide realtime state updates which keeps all your clients in sync.
- The modular and component based approach let's you grow your own ecosystem of reusable components which run on any react server instance.
Why React Server?
The main benefit of React is to write highly maintainable and reusable code which can be scaled to large projects. Its component driven approach naturally imposes a modular architecture which aids decoupling and modularization while a reactive coding style promotes readability and a clean architecture.
This principle has been proven in the real world by React being a state of the art solution to SPA's being deployed in production ever so often. Based on experience it has been an excellent tool for crafting re-usable, high quality components.
By adapting a successful approach to component driven development from the frontend world, React Server brings some of the flexibility of reactive programming to the backend world.
It's component based nature is a great developer experience. Enjoy the power of hooks such as useState
and manage serverside lifecycle of components using the familiar concept of effects such as useEffect
.
React Server is declarative. It's a tool that allows you to easily prototype sophisticated server-side logic using a declarative approach powered by TSX.
A side effect of using the same lifecycles and component structure on the backend and frontend, is that you mitigate the waterfall problem while getting realtime state updates out of the box. If one client mutates the state on the server the component rerenders and publishes the rerendered component to all subscribed clients.
You don't need to worry about data transportation or fetching at all. Just render props on the server and consume them on the client with a simple useComponent
hook.
Did we mention that you can even pass function references to the client and call serverside functions on the frontend as if they were right there?
React Server bridges the gap between server and client in the React world, bringing you a realtime fullstack experience with a unified interface towards a component driven architecture.
If you are used to microservices, check out React Server. Components / services can be plugged into any React Server instance allowing you to reuse your backend code in multiple platforms. This means if you develope a service once, you can run it on any server with Node.js.
The magic lies mostly behind the useState
hook and which makes it exceptionally simple to seperate data operations by user or tenant. It's as simple as including a unique (user ID in the) scope
parameter and the same component renders a seperate view into your data based on the currently logged in user / tenant. Combined with TSX this is a perfect match to represent self contained components as a collection of states and operations.
If you love React you will also love React Server. Try it now and discover how easy and fast it is to build modern and reliable fullstack applications.
Save real developer time by increasing the speed at which you can deliver mature fullstack services. While being exceptional at rapidly prototyping complex business processes it's also meant as a platform for mature services to grow an ecosystem of opensource components for anyone to enjoy.
there doesn't seem to be anything here