We recently released Vaadin 24.4.0.beta1. One of the new features that we’re introducing is a wrapper that helps you use React components from Flow. Here’s how you can try that out right now. Start by downloading https://start.vaadin.com/dl?preset=react&preset=partial-prerelease, extracting it, importing it to an IDE, and running the main method in Application.java.
You can wrap any React component as a Flow component by wrapping it as a web component using a provided helper class. This helper will give access to state variables set from the server and provides a way of passing events back to the server.
CustomField is a good candidate for that; in addition to the data binding, it gives you Label, Helper text, and other common features: Custom Field | Components | Vaadin Docs
You can also use the AbstractCompositeField class even though would then have to define two separate classes for the component (an internal one using ReactAdapterComponent and then the “actual” component as a AbstractCompositeField). There’s also an open issue about providing a mechanism for integrating with a React component in a way that lets you use an arbitrary super class.
Vaadin will keep using web components for reusable components. Those components are historically built using Polymer but there’s an initiative ongoing to migrate them to use Lit instead. For building applications, we support both server-side Java through Flow and client-side TypeScript through Hilla.
With Flow, the server-side component APIs remain as the main recommended way of defining the component tree and the UI logic. There’s also the possibility of using the LitTemplate Java class to define the component tree using Lit. We’re also considering a similar option based on JSX and React.
For Hilla, we will recommend using React but will keep supporting Lit as well. See this post for more details about Hilla.