It’s funny, this is how we built apps in 2014-era Rails at Airbnb, and by 2015 we were doing server-side rendering of some React components too. We had a thing to pop a React component into our regular rails views as a “partial”.
<%= render_react_component('MyComponent.js', :name => 'Hypernova The Renderer') %>
https://github.com/airbnb/hypernova?tab=readme-ov-file#rails