> Markdown version of [React Views](https://vaadin.com/docs/next/flow/react-views). Section index: [llms.txt](https://vaadin.com/docs/next/flow/llms.txt)

# React Views

A React view is a view written in React and TypeScript that runs in the browser. It calls Java code on the server through [browser-callable services](https://vaadin.com/docs/next/flow/react-views/browser-callable-services.md), using a TypeScript module that Vaadin generates for each service. A Flow view, by contrast, runs on the server, and the browser only shows what the server sends it.

React views and Flow views can be in the same application. They share the client-side router and the browser session, and the same Spring Security configuration protects both.

This section is the reference for React views. For when to choose a React view, and for step-by-step guides, see [React Views](https://vaadin.com/docs/next/building-apps/react.md) in Building Apps.

- [Routing](https://vaadin.com/docs/next/flow/react-views/routing.md): File naming conventions, layouts, view configuration, and the router configuration of React views.
- [Flow Interoperability](https://vaadin.com/docs/next/flow/react-views/flow-interop.md): Flow views in the React menu, page titles, Flow layouts around React views, and Flow components inside React views.
- [Component Events](https://vaadin.com/docs/next/flow/react-views/component-events.md): Listener props and event types of Vaadin React components.
- [Browser-Callable Services](https://vaadin.com/docs/next/flow/react-views/browser-callable-services.md): Java services whose public methods React views call through generated TypeScript modules.
- [Forms](https://vaadin.com/docs/next/flow/react-views/forms.md): Bind the fields of a React view to a Java type, validate them with Bean Validation, and save the value with a browser-callable service.

## <a id="enabling"></a>Enabling React Views

React views and browser-callable services come with the Hilla Spring Boot starter, which `vaadin-spring-boot-starter` doesn’t include. Add it to the project:

`pom.xml`

```xml
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>hilla-spring-boot-starter</artifactId>
</dependency>
```

The version comes from the `vaadin-bom` dependency management. Without the starter, Vaadin ignores the files in `src/main/frontend/views` and generates no TypeScript clients for services.

React views require a Spring Boot application.

## <a id="frontend-files"></a>Frontend Files

React views and the files around them are in `src/main/frontend`:

- `views/`

  The views. The router derives each view’s route from its path in this directory. See [Routing](https://vaadin.com/docs/next/flow/react-views/routing.md).

- `generated/`

  Files that Vaadin generates when it builds the frontend. These include the TypeScript clients of browser-callable services, the route list, and the default `routes.tsx` and `index.tsx`. Vaadin overwrites them, so don’t edit them.

- `routes.tsx`, `index.tsx`

  Optional. Vaadin uses a file here instead of the generated one. To customize the router, start from a copy of the generated `routes.tsx`, as described in [The Route Configuration File](https://vaadin.com/docs/next/flow/react-views/routing.md#routes-file).

## <a id="react-and-flow-views-in-one-application"></a>React and Flow Views in One Application

The router shows a React view when one matches the path. Otherwise, it passes the path to the server, which shows the Flow view with that route. Links and programmatic navigation work the same way for both kinds of views.

Beyond navigation, the two kinds of views share these parts:

- **Menu**: the function that creates menu items from the React views also includes Flow views annotated with `@Menu`.

- **Layout**: a Flow layout annotated with `@Layout` can wrap React views.

- **Page title**: a React layout can show the page title of Flow views.

See [Flow Interoperability](https://vaadin.com/docs/next/flow/react-views/flow-interop.md) for these, and for using Flow components inside React views.

## <a id="hilla"></a>The Hilla Name

React views and browser-callable services used to be a separate framework called Hilla, which is now part of Vaadin. The name remains in identifiers, so you still see it in a project:

- The `hilla-spring-boot-starter` dependency

- The Java packages under `com.vaadin.hilla`, such as the one of `@BrowserCallable`

- The npm packages whose names start with `@vaadin/hilla-`, such as `@vaadin/hilla-react-signals`

- The `hillaGenerate` Gradle task, and the Gradle properties that start with `com.vaadin.hilla`

- The [Hilla repository on GitHub](https://github.com/vaadin/hilla), which has the source code and the issues

When other pages of this documentation, or its earlier versions, mention Hilla, they mean React views and browser-callable services.
