Skip to content
javahacks.dev
Vaadin

Vaadin vs React With Spring Boot for Internal Tools

Compare Vaadin and React on a Spring Boot backend for internal tools: team skills, delivery speed, API surface, testing, UX ceiling and long term cost.

5 min read
Summarize in AI
Flat illustration of two options weighed side by side, with the Vaadin, React, Spring Boot and Spring logos.

A team that builds internal tools, admin screens, back-office dashboards and data-entry applications on Spring Boot has two common ways to give them a user interface. Vaadin lets the same Java developers build the UI in Java, with components and server-side state. React, with a REST or similar API in front of the Spring Boot services, gives a JavaScript interface built by people who know the frontend. Both work. They suit different teams and different tools, and the wrong choice shows up months later as slow delivery or a hard-to-maintain UI. This post compares them on the points that decide the outcome. It assumes Vaadin 25 and React 19 with Spring Boot 4.

The shape of each

With Vaadin Flow, the UI is Java code running on the server. A view is a class, a button is an object, and a click handler is a lambda. The browser holds a thin client that renders what the server tells it to and sends events back. There is no API to design between the UI and the services, since the view calls the service beans directly. State lives on the server in the session, a consequence examined in sessions and memory in Vaadin.

With React, the UI is a JavaScript application that runs in the browser and talks to the backend over HTTP. The backend exposes a documented API, the frontend has its own build, its own tests and its own deployment, and state lives mostly in the browser. The two parts are separate systems that agree on a contract, which the guidance in REST API design rules helps get right.

A middle path exists: Hilla, from the Vaadin company, generates a typed TypeScript client from Java endpoints, so a React frontend calls Spring services without a hand-written API layer. It is covered in Vaadin Hilla with React.

Where Vaadin wins

A Java team that needs forms, tables and dashboards quickly gets there faster in Vaadin, because there is one language, one build, one set of tools and one testing approach. A CRUD screen with a grid, a form and validation is a day's work rather than a sprint, as the walk-through in a CRUD application with JPA shows. Security is handled once, in Spring Security, on the server, which removes a class of mistakes where the frontend enforces a rule the API does not; see securing a Vaadin application. There is no duplicated model: the entity or DTO is used in the view directly. The component set, including data grids with sorting and lazy loading, is large and consistent. For an internal tool with fifty users and a deadline, these advantages dominate.

Where React wins

React wins when the interface is the product. A public site, a highly custom design, rich client-side interactions such as drag and drop canvases, offline support, or a mobile-first experience all lean toward a browser-side application. It also wins when you have frontend specialists: people who know React, TypeScript and CSS well will be more productive in it than in a Java UI framework, and the ecosystem of libraries is far larger. A separately deployed frontend scales independently, because the server holds no per-user UI state, and a thousand concurrent users cost far less memory. If the same API must serve a mobile app or other clients, you need the API anyway, and a React frontend is one more client of it.

Decision rule

QuestionPoints to VaadinPoints to React
Who builds the UI?Java developersFrontend specialists
Who uses it?Dozens to a few hundred staffPublic or thousands of users
How custom is the design?Standard components are fineA distinct brand and interactions
Is an API needed anyway?NoYes, for other clients
How fast must the first version ship?Quickly, with few peopleTime allows a larger team
Offline or heavy client logic?NoYes

Count the answers, then add a tie-breaker: choose the technology your team can maintain in two years without the person who started it. A Java team that picks React for an internal tool and has one frontend developer has created a bus factor of one. A team with three frontend engineers and no Vaadin experience that picks Vaadin because it sounds convenient has done the same in reverse.

The same screen in each

A customer list with a search box shows the difference in effort. In Vaadin, the whole view is Java:

java
@Route("customers")
class CustomerView extends VerticalLayout {
    CustomerView(CustomerService service) {
        var search = new TextField("Search");
        var grid = new Grid<>(Customer.class);
        search.addValueChangeListener(e -> grid.setItems(service.search(e.getValue())));
        add(search, grid);
    }
}

The React version needs a controller that exposes the search, a client function, a component and its state:

java
@RestController
class CustomerController {
    @GetMapping("/api/customers")
    List<CustomerDto> search(@RequestParam(defaultValue = "") String q) { return service.search(q); }
}
Text
function Customers() {
  const [q, setQ] = useState("");
  const [rows, setRows] = useState([]);
  useEffect(() => { fetch("/api/customers?q=" + q).then(r => r.json()).then(setRows); }, [q]);
  return (<><input value={q} onChange={e => setQ(e.target.value)} /><Table rows={rows} /></>);
}

The React code is more flexible and more to write, test and keep in step with the API. Multiply by every screen of an internal tool to see where the weeks go. The reverse holds for a screen with a custom drag and drop interaction: there React is a few lines and Vaadin needs a custom component.

The cost of switching

Switching later is not cheap in either direction. A Vaadin application's views are Java classes that cannot be reused in a React app, though the services and entities underneath carry over unchanged if you kept them separate. Moving from React to Vaadin discards the frontend and keeps the API, which could then be left in place. The practical advice is to keep the business logic in services with no UI dependency, so the UI is replaceable. A thin view layer is the best insurance, whichever framework you pick.

Sharing the service

Whichever you choose, the service layer should not know. Write services that take and return plain objects, put transactions and security there, and let Vaadin views or REST controllers call them. A team that does this can run a Vaadin admin screen and a React customer site on the same services, and even mix: Vaadin for the internal tools and React for the public pages. The question of server-rendered alternatives with less JavaScript than either is covered in Vaadin versus htmx and Thymeleaf.

Where this comparison does not apply

An application with thousands of concurrent anonymous users should not hold server-side UI state per visitor, and React or a server-rendered site is the answer. A tool that must work on a flaky connection needs client-side logic. And a one-page script with three buttons needs neither. The facts about each are in the React learning guide and the Vaadin Flow documentation.

Share

Keep reading

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.