JS Days 2025 is now live – Join 5,000+ devs for the premier virtual JavaScript event. Register Now

The Ext JS Reactor: Use Your Favourite Ext JS Components Inside React

November 30, 2016 1563 Views

Integration of Ext JS components into a React application is a nice combo. You have powerful Ext JS’s pre-built UI components in the flexible, React reusable system. It’s like having the best of both worlds, rich JavaScript components and smooth React elements. Just a heads-up, though: it’s not always a drag-and-drop setup. Some tweaks might be needed.

The Ext JS Reactor: Use Your Favourite Ext JS Components Inside React

But if you’re looking for a strong JavaScript UI component library to boost your app’s design, this combo is definitely worth checking out. That’s where ReExt comes in. It helps in using Ext JS’s pre-built UI components inside your React app, and the amazing thing is that you don’t have to rewrite anything. So, you can easily mix Ext JS’s strong, structured setup with React’s flexible, component-based style. They both work together nicely.

This blog helps you to understand how ReExt works in a simple, hands-on way. We’ll walk through how to build a simple app and show why it’s considered the best JavaScript UI component library for creating clean, interactive interfaces. We’ll also examine the key benefits and performance.

And if you want to work as a pro, we’ll provide some tips. Whether you’re exploring JavaScript web components, JS UI components, or diving into a new React JS component library, this guide breaks things down clearly and practically.

Let’s get started.

How To Use Ext JS Inside React?

ReExt is a great pick if you’re using React and want to bring in Ext JS. It lets you drop Ext JS right into your React app without the hassle. Simple, clean, and just works. It’s super convenient when you are working with powerful, ready-to-use UI components.

ReExt

Got a React app but stuck with old Ext JS code? Rewriting everything is a pain. There’s gotta be a better way than starting over. That’s where using ReExt helps developers.

It’s a very convenient and useful JavaScript component library that allows you to use Ext JS components right inside your React apps. No need to write again and again. With ReExt, you can drop in powerful UI tools like grids, charts, and forms- all as React components.

These aren’t stripped-down versions either. You get the full feature set, but in a way that feels like you’re using regular React components of JavaScript. What’s nice is how ReExt wraps everything neatly. It brings modern React elements and older JavaScript web components together without making things messy.

You’re not learning a new JavaScript components framework; you’re just working with tools you already know. It’s great for projects that mix old and new. Maybe your app started years ago with classic JavaScript UI components, but now you’re switching to React. ReExt helps bridge that gap.

The integration’s smooth, the setup’s easy, and it saves a ton of time. If you’re looking for a UI component library that lets you reuse proven tools without slowing down React development, ReExt is worth a look.

No fluff, just a practical way to work smarter with JS UI components. And yeah, it plays well with React UI component libraries, so you’re not locked into just one style.

How Does ReExt Work?

So, how does ReExt actually work? Basically, it takes Ext JS components and makes them work like regular React JS components. You can drop them in with your usual React elements—no messy workarounds. It all just clicks together smoothly, like they were built to belong in the same UI.

One thing I really like about ReExt is that it just handles stuff. It keeps the UI in sync and takes care of state changes without making a mess. React and Ext JS work together smoothly, so you don’t need to look into the details.

You don’t need to handle unusual bugs. They work quietly in the background. You don’t have to stress about data moving between React and Ext JS. ReExt quietly handles it all for you.

It’s a lifesaver, especially when you’re working with heavy stuff like grids, charts, or forms that need to stay quick and smooth. Think of ReExt like a bridge. It pulls in solid JavaScript UI components and gets them playing nicely with React.

Basically, it gives you the power of a full JavaScript components framework, right inside your React project. Think of it as a bridge between powerful pre built UI components and modern React workflows. If you’re diving into JavaScript web components or hunting for the best UI library for React, ReExt has you covered.

It’s an easy way to mix solid JavaScript components with React elements, letting you keep your React setup while adding some cool, pre built UI components.

How Do You Use ReExt?

ReExt can easily be used. Just go and check out the Sencha ReExt site. They have good documentation and many examples that really help to understand it quickly. No fuss, just straightforward information to get you started.

Install the ReExt Designer Extension in VS Code

If you’re building React apps and want to speed things up, the ReExt Designer Extension for Visual Studio Code is a must-have. It makes creating JavaScript components way easier right inside your favorite editor. Plus, it plays nicely with the whole VS Code setup you already know.

Here’s how to get it running:

  • Open up Visual Studio Code.
  • Head over to the Extensions tab on the sidebar.
  • Search for “ReExt Designer” and then press install.

And that’s basically it! This extension lets you jump right into building JavaScript UI components without any fuss. Plus, it gives you access to a bunch of pre-built UI components from a solid JavaScript component library. If you’re working with React JS components examples, it’s like having a handy toolbox of design pieces ready to use.

If you get stuck or run into any issues, no stress, Sencha’s support team usually gets back to you fast and helps sort things out. Honestly, if you want a solid UI library for React that makes building with JS components way easier, this extension is definitely worth checking out.

Quick Start – No VS Code Extension needed

If you’re not into using the VS Code extension, no worries. You can set up your React project manually with just a few simple commands. This works great with most modern JavaScript UI component libraries and gets you up and running fast.

Set up on MacOS

npm create vite@latest reextvite -- --template react-swc
cd reextvite                                                                 
npm install @gusmano/reext@latest
cp node_modules/@gusmano/reext/dist/example/ReExtData.json src/ReExtData.json
cp node_modules/@gusmano/reext/dist/example/App.jsx src/App.jsx
cp node_modules/@gusmano/reext/dist/example/main.jsx src/main.jsx
npx vite _open

This launches your React app with ReExt. The pre-built JavaScript UI components are ready to use.

Create React App Alternative

npx create-react-app reextcra
cd reextcra
npm install @gusmano/reext@latest
cp node_modules/@gusmano/reext/dist/example/ReExtData.json src/ReExtData.json
cp node_modules/@gusmano/reext/dist/example/App.jsx src/App.jsx
cp node_modules/@gusmano/reext/dist/example/main.jsx src/main.jsx
npm start

This method is ideal for developers comfortable with React JS components and looking to integrate a JavaScript components library seamlessly.

Build a Simple Application Using ReExt

Here is a step-by-step guide to building your first app with ReExt:

1. Create a React Application

npx create-react-app reextcra

2. Install Vite (Optional)

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

3. Install ReExt

npm install @gusmano/reext

4. Install Sencha ExtJS SDK

Place the ExtJS SDK in your project’s public folder. You can use the remote GPL version for testing.

5. Configure ReExtProvider

In main.jsx, wrap your app using ReExtProvider. This is essential to initiate the JavaScript UI components.

import { ReExtProvider } from '@gusmano/reext';
const ReExtData = {
  sdkversion: "7.8.0",
  toolkit: "classic",
  theme: "classic",
  debug: false,
  urlbase: "./",
  location: "remote"
};
ReactDOM.render(
  <ReExtProvider splash={true} ReExtData={ReExtData}>
    <App />
  </ReExtProvider>,
  document.getElementById('root')
);

Example Application Code

Here’s a sample React application using ReExt with several user interface design components such as grids, labels, and buttons:

import React, { useState, useRef } from 'react';
import ReExt from '@gusmano/reext';
const App = () => {
  const [labelcmp, setLabelCmp] = useState(null);
  const labelcmpRef = useRef();
  labelcmpRef.current = labelcmp;
  const [labeltext, setLabelText] = useState('initial text');
  const [row, setRow] = useState(null);
  return (
    <div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
      <ReExt xtype='logo' />
      <div style={{ display: 'flex' }}>
        <ReExt xtype='button'
          config={{ text: 'click me', width: 100, ariaLabel: 'demobutton' }}
          onTap={() => {
            labelcmpRef.current.setHtml('set using method call');
            setLabelText('set using state');
          }}
        />
      </div>
      <ReExt xtype='grid'
        style={{ height: 300 }}
        config={{
          title: 'grid',
          columns: [
            { text: 'Name', dataIndex: 'name', width: 200 },
            { text: 'Email', dataIndex: 'email', flex: 1 },
            { text: 'Phone', dataIndex: 'phone', width: 200 }
          ],
          data: [
            { name: 'Lisa', email: '[email protected]', phone: '555-111-1224' },
            { name: 'Bart', email: '[email protected]', phone: '555-222-1234' },
            { name: 'Homer', email: '[email protected]', phone: '555-333-1244' },
            { name: 'Marge', email: '[email protected]', phone: '555-444-1254' }
          ]
        }}
        onSelect={(grid, selected) => {
          var row = selected[0].data;
          setRow(row);
          var rowString = JSON.stringify(row);
          labelcmpRef.current.setHtml(rowString);
          setLabelText(rowString);
        }}
      />
      <div style={{ flex: 1, padding: 20, border: '1px solid gray' }}>
        {row !== null && (
          <>
            <ReExt xtype='label' config={{ html: `name: ${row.name}` }} />
            <ReExt xtype='label' config={{ html: `email: ${row.email}` }} />
            <ReExt xtype='label' config={{ html: `phone: ${row.phone}` }} />
          </>
        )}
      </div>
      <div style={{ flex: 1, padding: 20, border: '1px solid gray' }}>
        <ReExt xtype='label'
          config={{ html: 'initial text' }}
          ready={(cmp) => setLabelCmp(cmp)}
        />
        <ReExt xtype='label' config={{ html: labeltext }} />
      </div>
    </div>
  );    
};
export default App;

This example highlights how you can use JavaScript UI components and React JS components together effectively.

Why Choose ReExt?

ReExt makes your life easier if you want to use both React and Ext JS strengths. You don’t need to build everything from scratch. Just add Ext JS components straight to a React application and start using them.

It’s way easier and saves you a lot of hassle. No need to redo JavaScript components you already know and trust, especially if your project leans heavily on Ext JS UI components.

It just makes everything faster and less complicated. Plus, Ext JS components are known for being speedy and handling large data like a champ. With ReExt, you get those performance perks inside your React app without giving up React’s smooth flexibility and reactivity.

It really feels like having the best of both worlds, the solid, pre built UI components from Ext JS combined with the ease and power of React elements. Plus, you don’t have to pick one over the other.

ReExt lets you keep React and Ext JS up to date separately. So, you can enjoy React’s state management and clean user interface design components, while still using the rich, pre-built UI components from Ext JS.

It’s a smart way to mix and match your favorite JS UI components framework without compromise.

Tips for Using ReExt Smoothly in Your React Projects

If you’re adding ReExt to your React app, there are some simple things to keep in mind to make life easier:

  • React works best with its declarative style. So, instead of doing things yourself, let React handle this. Let it take control of the rendering flow; it’s what it does best.
  • If you try to change things in the DOM manually, it’s a complete mess. Trust me, it’ll break things or cause unexpected behavior.
  • React itself can perform very nicely and efficiently with these things. That’s why using its built-in features keeps your app smooth and maintainable.
  • Ext JS components are great, but don’t go crazy using tons of them all at once, especially if your app deals with big datasets. It’s tempting to load up on fancy charts and grids, but too many JavaScript web components can slow things down fast.

So, think ahead about how and when to load data. Lazy loading can really help if you’ve got complex views or heavy JavaScript UI components.

React has a tool for managing data and application behaviour, called hooks, like useState and useEffect. They are really helpful in syncing the React JS components and Ext JS parts. That way, your UI components work together nicely without any weird glitches.

And don’t forget, whether you’re picking a JavaScript component library or working with React UI component libraries, these tips help you get the best performance and a smoother user experience. It’s all about balance, clean structure, and knowing when to let the framework do the heavy lifting.

Conclusion

If you’re building a simple or complex app with React and want something smoother and more efficient, ReExt might be your new favorite tool. It combines the flexibility of React with a powerful set of pre-built UI components. So, instead of starting from scratch, you get a solid foundation right out of the box.

What makes ReExt stand out is how easily it blends React elements with JavaScript web components. You’re not locked into clunky setups; it’s all about clean, fast development using a reliable JavaScript components framework. It feels like working with native React JS components, but with more power and less fuss.

Think of it like a shortcut to sleek, user-friendly design. With ReExt, you’re tapping into a rich JavaScript UI component library that gives you buttons, forms, layouts, and more—all styled and ready to go. It’s ideal if you’re after the best UI library for React without spending days customizing every piece.

So, whether you’re into exploring components of JavaScript or just need a smart UI component library to ship your product faster, ReExt gets the job done. It’s built for developers who want results without reinventing the wheel.

Sign Up at ReExt to create better solutions for your enterprises today!

FAQs

What are the components of the web?

You’ve got three basics: HTML builds the structure, CSS makes it look nice, and JavaScript adds the fun stuff. JavaScript components like buttons or sliders step in to make the page actually do things.

How to add JavaScript code to a React component?

You can embed JavaScript code directly in your component’s JSX by using curly braces {} or include logic within useEffect, useState, or event handlers.

Can you pass a component as a prop in React?

Yes, React makes it easy to pass components as props, either with JSX or render props. This is a common and useful way to reuse components in your app.

How are JavaScript objectives a valuable component of websites?

JavaScript is key for making websites come alive. It handles things like updating content on the fly, managing what’s going on behind the scenes, and keeping things interactive. Without it, modern web apps just wouldn’t work the way we expect.

Can you import components without a JavaScript framework?

Yes, web components built with native JavaScript (like custom elements) can be imported without a specific framework.

How to make your own React component?

Create a function or class that returns JSX. For example:

const MyComponent = () => <div>Hello</div>;

This is the basic pattern to make a custom component in React.

Trusted by Top Developers: Learn how to enhance your development journey — for free

Get the latest newsletter keeping thousands of developers in the loop.

Loved by developers at