/  Technology   /  Getting Started with ReExt: A Developer’s Guide to React Integration

Getting Started with ReExt: A Developer’s Guide to React Integration

 

In the fast-paced world of web development, efficiency, scalability, and user experience are paramount. React, a popular JavaScript library for building user interfaces has revolutionized how developers create interactive and dynamic applications. However, as applications grow in complexity, the demand for robust UI components and seamless integration with existing frameworks intensifies. This is where ReExt by Sencha steps in, offering a powerful bridge between React and Ext JS, enabling developers to build high-performance, feature-rich web applications with ease. This guide aims to provide you with a comprehensive overview of ReExt, its benefits, and a step-by-step approach to integrating it into your React projects.

Introduction to ReExt

As web applications become more intricate, developers seek tools that not only simplify the development process but also enhance the application’s performance and maintainability. ReExt by Sencha is designed to address these needs by integrating Ext JS components seamlessly into React applications. This fusion allows developers to harness the power of Ext JS’s rich component library within the modern React ecosystem, fostering rapid development without sacrificing flexibility or control.

What is ReExt?

ReExt is an extension developed by Sencha that bridges the gap between React and Ext JS, two formidable players in the JavaScript framework landscape. While React excels in building dynamic and responsive user interfaces, Ext JS offers a comprehensive set of high-performance UI components designed for enterprise-grade applications. ReExt allows developers to leverage the strengths of both frameworks, enabling the use of Ext JS components within React applications effectively.

By integrating ReExt, developers can tap into Ext JS’s robust component library—featuring grids, trees, charts, calendars, and more—within the React paradigm. This integration facilitates the creation of complex, data-rich applications with minimal overhead, enhancing both development speed and application performance.

Key Features of ReExt

ReExt is packed with features that cater to both novice and experienced developers, making it a versatile tool for React integration.

Pre-built React UI Components

ReExt offers 140+ pre-built React UI components, significantly reducing the time and effort required to build feature-rich applications. These components include:

  • Grids: Advanced data grids with support for sorting, filtering, grouping, and editing.
  • Trees: Hierarchical tree components for displaying structured data.
  • Charts: A variety of interactive charts for data visualization, including line, bar, pie, and more.
  • Calendars: Customizable calendar components for scheduling and event management.
  • D3 Integration: Seamless integration with D3.js for crafting personalized dynamic visualizations.

These pre-built components are designed to be both powerful and flexible, allowing developers to focus on building application logic rather than reinventing UI elements.

Reusable and Fully Customizable

ReExt emphasizes reusability and customizability, enabling developers to create components that can be used across different parts of an application without modification. Each component is fully customizable through React props, event handlers, and styles, ensuring that developers can tailor them to fit specific use cases seamlessly.

Compatibility and Performance

ReExt is compatible with React 16+ and Ext JS 7.x+, ensuring seamless integration with current and future projects. The framework is optimized for high performance, capable of handling large datasets and complex interfaces without compromising on responsiveness or speed.

Continuous Updates & Support

Sencha is committed to providing continuous updates and expert support for ReExt users. This commitment ensures that developers have access to the latest features, security updates, and performance enhancements, keeping their applications up-to-date with industry standards.

Setting Up ReExt

Setting up ReExt in your React project is straightforward, thanks to comprehensive documentation and support provided by Sencha. Below are the steps to get started.

Installing ReExt via npm

ReExt is distributed via npm, making it easy to install and manage within your project. The installation process varies slightly depending on whether you are a trial or active customer.

If You Are a TRIAL Customer

For those evaluating ReExt, Sencha offers a 30-day trial package available on the public npm registry. To install the latest ReExt version, run the following command in your project’s root directory:

npm install @sencha/reext

If You Are an ACTIVE Customer

Active customers have access to Sencha’s private npm registry, which hosts ReExt. To install ReExt for active customers:

Login to Sencha’s Registry: Replace name..gmail.com with your actual username, where the @ symbol is replaced by two periods.

npm login --registry=https://npm.sencha.com/ --scope=@sencha

Note: Ensure that your username is correctly formatted, replacing the @ with two periods as specified.

Install ReExt:

npm install @sencha/reext

 

Using the ReExt Designer Extension in Visual Studio Code

To maximize the benefits of ReExt, it’s recommended to use the ReExt Designer Extension within Visual Studio Code (VS Code). This extension provides a visual interface for designing and managing your components, making the development process more intuitive.

Installing the Extension

  1. Download the Extension: Obtain the preview version of the ReExt Designer Extension from the provided source.
  2. Install in VS Code:
    • Open VS Code.
    • Navigate to the Extensions Activity Bar.
    • Click the ‘…’ menu in the upper right corner of the Extensions View.
    • Select ‘Install from VSIX…’ and choose the downloaded extension file.
  3. Activate the Extension: Once installed, the extension should activate automatically, providing additional tools and menus within VS Code tailored for ReExt.

Quick Start Guide

ReExt supports various React setups, including Vite, Next.js, and Create React App. Below are step-by-step instructions to get started with each setup on both macOS and Windows.

Vite Setup

Vite is a fast and modern build tool for frontend development. To set up a ReExt project with Vite:

Create a New Vite Project:

npm create vite@latest reextvite -- --template react-swc
Navigate to Project Directory:
cd reextvite
Install ReExt:
npm install @sencha/reext@latest
Copy Configuration and Example Files:
cp node_modules/@sencha/reext/dist/example/vite.config.js vite.config.js
cp node_modules/@sencha/reext/dist/example/App.jsx src/App.jsx
cp node_modules/@sencha/reext/dist/example/main.jsx src/main.jsx
Run the Project:
npx vite --open

Next.js with JavaScript

Next.js is a robust React framework for building server-side rendered applications.

Create a New Next.js Project:

npx create-next-app@latest reextnext --js --eslint --no-tailwind --no-src-dir --app --import-alias "@/*"

Navigate to Project Directory:

cd reextnext
Install ReExt:
npm install @sencha/reext@latest

Copy Configuration and Example Files:

cp node_modules/@sencha/reext/dist/example/next.config.mjs next.config.mjs
cp node_modules/@sencha/reext/dist/example/layout.js app/layout.js
cp node_modules/@sencha/reext/dist/example/page.js app/page.js
Run the Project:
npm run dev

Next.js with TypeScript

For developers preferring TypeScript, setting up Next.js with ReExt is straightforward.

Create a New Next.js Project with TypeScript:
npx create-next-app@latest reextnext --ts --eslint --no-tailwind --no-src-dir --app --import-alias "@/*"

Navigate to Project Directory:

cd reextnext
Install ReExt:
npm install @sencha/reext@latest
Copy Configuration and Example Files:
cp node_modules/@sencha/reext/dist/example/next.config.mjs next.config.mjs
cp node_modules/@sencha/reext/dist/example/layout.tsx app/layout.tsx
cp node_modules/@sencha/reext/dist/example/page.tsx app/page.tsxRun the Project:
npm run dev

Create React App

Create React App is a widely-used tool for setting up React projects quickly.

Create a New Create React App Project:
npx create-react-app reextcra

Navigate to Project Directory:

cd reextcra

Install ReExt:

npm install @sencha/reext@latest

Copy Configuration and Example Files:

cp node_modules/@sencha/reext/dist/example/vite.config.js vite.config.js
cp node_modules/@sencha/reext/dist/example/App.jsx src/App.js
cp node_modules/@sencha/reext/dist/example/main.jsx src/index.js

Run the Project:

npm start

Windows Setup

For Windows users, the installation process involves similar steps with slight variations in file paths.

Create a New Vite Project:

npm create vite@latest reextvite -- --template react-swc

cd reextvite
npm install @sencha/reext@latest
copy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js
copy node_modules\@sencha\reext\dist\example\App.jsx src\App.jsx
copy node_modules\@sencha\reext\dist\example\main.jsx src\main.jsx
npx vite --open

Create a New Next.js Project with JavaScript:

npx create-next-app@latest reextnext --js --eslint --no-tailwind --no-src-dir --app --import-alias "@/*"
cd reextnext
npm install @sencha/reext@latest
copy node_modules\@sencha\reext\dist\example\next.config.mjs next.config.mjs
copy node_modules\@sencha\reext\dist\example\layout.js app/layout.js
copy node_modules\@sencha\reext\dist\example\page.js app/page.js
npm run dev

Create a New Next.js Project with TypeScript:

npx create-next-app@latest reextnext --ts --eslint --no-tailwind --no-src-dir --app --import-alias "@/*"
cd reextnext
npm install @sencha/reext@latest
copy node_modules\@sencha\reext\dist\example\next.config.mjs next.config.mjs
copy node_modules\@sencha\reext\dist\example\layout.tsx app/layout.tsx
copy node_modules\@sencha\reext\dist\example\page.tsx app/page.tsx
npm run dev

Create a New Create React App Project:

npx create-react-app reextcra
cd reextcra
npm install @sencha/reext@latest
copy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js
copy node_modules\@sencha\reext\dist\example\App.jsx src\App.js
copy node_modules\@sencha\reext\dist\example\main.jsx src\index.js
npm start

 

Conclusion

ReExt stands out as a powerful extension that seamlessly integrates Ext JS’s robust component library into React applications, offering developers a middle ground between robust security and seamless user interfaces. By providing a comprehensive suite of pre-built, customizable components, ReExt accelerates the development process while ensuring high performance and maintainability.

 

Ready to take your React development to the next level? Start your 30-day free trial of ReExt today and experience the seamless integration of Ext JS components within your React projects. 

 

Leave a comment