React JS Vaadin Integration

Hello, we’re trying to integrate a Vaadin panel component into a React JS application. The approach we’ve used is Spring Boot utilizing the vaadinBootstrap.js file. This creates a new Vaadin UI each time the user visits a certain React tab. However, when the UI is replaced by a new instance, the old instance is never garbage collected. It appears that the SpringVaadinServlet maintains a reference to the UI. Before I attach example code, I was just wondering if anyone has had any success embedding a Vaadin UI in a React JS application and if there is a way to get the SpringVaadinServlet to release the UI when the content (Vaadin UI) of the React tab changes. Thanks!

Hi,

Embedding a Vaadin UI in a React JS app sounds pretty interesting. I am not completely certain why the SpringVaadinServlet would not release the UI. How long is the
heartbeatInterval
set to when you are initializing the Vaadin UI and do you have the
closeIdleSessions
servlet parameter set to
true
? Also, as you’ve mentioned, it would be quite helpful if you could post some example code :slight_smile:

BR,
Goran