React has emerged as one of the most popular JavaScript libraries for creating user interfaces. Its component-based architecture allows developers to build reusable UI elements, making it a preferred choice among web developers. However, many organizations face challenges when it comes to React migration of legacy application. They often struggle with whether to focus on migrating or continue improving their existing UI. This puts a heavy burden on the UI migration team, as they must have to juggle migrating and keeping up with new changes in the legacy UI. Fortunately, there is a powerful tool that can assist in this migration process — Persistent WingMate.

WingMate is a tool designed that leverages Generative AI (GenAI) and large language models (LLMs) to facilitate the migration process to React.js. It simplifies the task by comprehending rendered HTML code and converting it to JSX, which is a syntax extension for JavaScript. JSX allows you to write HTML-like code in JavaScript, making it easier to create and manage dynamic user interfaces. WingMate also provides a range of features and functionalities that streamline the migration process and alleviate the burden on the UI migration team. One of WingMate’s key features is its automated code migration capabilities, which analyzes existing UI codebase and automatically converts it into React.js components, significantly reducing the manual effort required for migration. This allows a UI migration team to focus on more critical aspects of the migration process, such as resolving compatibility issues and ensuring a seamless transition. Additionally, WingMate determines if there are pre-built React components that can be reused into the migrated UI. These pre-built components further expedite the migration process and ensure consistency across the UI.

Why Choose WingMate?

There are several ways that WingMate can be an invaluable asset in frontend migration to React

WingMate migration process
Fig 1: WingMate migration process

First, a user will provide the input application to WingMate, which can be in the form of a live website or source code. WingMate will then go file by file and check for any dependencies within the UI files, such as JavaScript (JS) or jQuery. If any dependencies are found, WingMate will create a React component that incorporates the functionality from these dependent files.

WingMate generates RAG on previously created or generated React components. When new components are created, WingMate checks if a component with the same functionality exists. If so, WingMate reuses it; if not, WingMate creates a new component. Once the components are generated, WingMate will build the application. If there are any errors during the build process, WingMate will attempt to resolve them automatically.

The next step is to compare the actual webpage view with the one generated by LLMs. Users can identify any differences between the two views and ensure that generated components are an accurate representation of the original input application.

Collectively, WingMate’s capabilities deliver a series of productivity efficiencies and business benefits:

Streamlined Migration Process

WingMate simplifies the migration process by generating React components based on the provided frontend code. It leverages LLMs to analyze the HTML code and convert it into React components. This automated process saves significant development time and effort, allowing development team to focus on other critical aspects of their projects (and/or devote time to others).

‘Build and Validate’ Approach

WingMate follows a “build and validate” approach —it builds the React app when the app is created. If there are any build failures, WingMate tries to solve them and rebuilds it. After a successful build, it launches the React app.

Feedback-Driven Iterative Process

WingMate incorporates a feedback-driven iterative process to ensure the accuracy of the migrated React components. After generating the React components, WingMate will launch the app and take screenshots of the generated output. WingMate then utilizes Vision model to compare the actual web view with the generated view, identifying any differences. If the acceptance criteria is not met, the differences are passed back to the LLM for further analysis and refinement. This iterative process continues until the acceptance criteria is satisfied.

Discover the Value of WingMate

As developers at Persistent, we understand the importance of tools that can enhance productivity. After using WingMate for migrating one of our projects, we asked our developers for feedback. For that specific project, they reported a significant improvement in their productivity, estimating a 30% increase. This boost in productivity can be attributed to WingMate’s streamlined migration process and the elimination of manual coding tasks, allowing developers to focus on other project jobs and accelerating overall project completion. While productivity improvements could vary for other migration projects, depending on specific requirements, our developers experience provides a strong example of WingMate’s ability to act as a valuable digital assistant in migration initiatives.

Migrating to React can be complex and time-consuming — but such migrations are critical if companies are to upgrade their UIs, particularly for legacy systems. With WingMate’s ability to leverage coding automation, migration becomes significantly easier and more efficient. WingMate’s feedback-driven iterative process also makes it an invaluable tool for developers looking to leverage the power of React. Start using WingMate today and accelerate your journey to React.js and better UIs — contact us to learn more.

Author’s Profile

Aniket Thorat

Aniket Thorat

Software Engineer, Corporate CTO Organization

aniket_thorat2@persistent.com

Linked In

Aniket Thorat works as a Software Engineer in Generative AI at the Corporate CTO R&D organization at Persistent. He aims to leverage his experience to create WingMate – a development productivity platform.