Technical Articles
Nest React applications natively alongside UI5
In the dynamic world of business, we never know what requirements may come our way. While UI5 is already a powerful framework, there are times you need to integrate it with other UI technologies when business demands.
In this blog post, we’ll explore the blending of React application with UI5 by leveraging a custom UI5 control (UI5Nest) which effortlessly handles loading and embedding React applications. Unlike traditional solutions that rely on iframes, this integration takes advantage of native loading to HTML div elements, ensuring that your React app seamlessly blends with other UI5 controls, acting like any other UI5 control.

Above Image taken from CF Workzone . Below is the code for this,
<mvc:View
controllerName="nest.controller.Main"
displayBlock="true"
xmlns:custom="nest.ExtApp"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc">
<VBox
justifyContent="Center"
alignItems="Center"
height="100%" >
<VBox>
<Title text="UI5" titleStyle="H1" />
<Button text="count is {/count}" press=".onIncrement" />
</VBox>
<custom:UI5Nest id="react" />
</VBox>
</mvc:View>
Managed Router, HTML5 Repository and Build Workzone
UI5Nest control integration with Workzone or Fiori Launchpad (on-prem) is seamless. This means that your React application receives real-time updates for localization and theme changes when events occur.
You will receive these updates again if they change , ensuring you don’t miss any updates.
function onThemeChanged (sTheme) {
//Call central theme change function on App.jsx so it will serve standalone app and nested app
}
function onLocalizationChanged (sLocal) {
//Call central local change function on App.jsx so it will serve standalone app and nested app
}
`generator-ui5-react-nest` scaffolds the necessary files and configurations for managed router. So it is ready to deploying the Workzone service on Cloud Foundry.
UI5 Generator: `generator-ui5-react-nest`
npm i -g yo generator-ui5-react-nest
yo ui5-react-nest
You can access the git repo of the generator also https://github.com/aydin-ozcan/generator-ui5-react-nest.git