Introducing Syncfusion’s Pure React Components: Built from the Ground Up for React

syncfusionsyncfusion
5 min read

TL;DR: Syncfusion® has launched Pure React Components, crafted natively for React using hooks and functional components. These components boost app performance, offer smoother UI interactions, and ensure seamless integration with the React ecosystem. Try them now for a faster, modern React experience.

Introduction

React has revolutionized the way developers build user interfaces, offering a component-based architecture that emphasizes reusability, performance, and developer experience. With over 200,000 websites using React in production and millions of developers worldwide, it has become the most popular JavaScript library for building modern web applications.

Today, we’re excited to introduce Syncfusion®‘s Pure React Components: a complete set of UI components built from ground up specifically for React. Unlike wrapper components that adapt existing JavaScript libraries, our Pure React components are designed to leverage React’s core principles and ecosystem, providing a truly native React experience.

Let’s dive into the key features of these components:

What are Pure React components

Pure React components are built from scratch using React’s functional components and hooks, free from wrappers or non-React libraries. This approach delivers clean, idiomatic React code that integrates seamlessly with modern React applications.

Why choose the Pure React components?

Pure React components, crafted without reliance on non-React libraries like jQuery, JavaScript-based DOM manipulation, offer distinct advantages:

  • Provides better integration with the React ecosystem.

  • Enhances performance predictability by minimizing overhead.

  • Ensure cleaner, more maintainable code through modular hooks and functional patterns.

  • Avoids lifecycle mismatch that arises from wrapping non-React libraries.

  • Improve the developer experience.

Advantages of the Pure React components

The Pure React components offer the following benefits:

Fully reactive

Our React components are fully reactive, responding quickly and consistently to changes in state or props. They update only the necessary parts of the UI, ensuring efficient rendering.

Each component’s behavior, appearance, and DOM output remain synchronized with React’s state and prop changes, eliminating the need for manual refresh calls or forced updates.

Optimized state updates

State updates are now more efficient. Components avoid full re-renders by updating only the affected parts, resulting in faster response times and smoother user experiences.

Preserved active states

Components now maintain active states, such as focused inputs or active selections, during state change in parent or sibling components. This ensures seamless user interaction without disruptions.

Streamlined template rendering

We’ve replaced our previous portal-based template rendering approach with a Pure React implementation. Template elements are now rendered the React way, making it easier for developers to pass JSX elements directly and components and ensuring the rendering logic stays fully in sync with React’s lifecycle.

Improved performance

From component rendering to user interactions, everything feels snappier. By eliminating unnecessary re-renders and refining our component architecture, we’ve dramatically improved performance so that every interaction is smooth and responsive.

Enhanced themes

Our component themes adhere to Material Design 3 standards, delivering a modern, consistent, and intuitive user experience. We have integrated scalable, customizable SVG icons for sharp visuals at any resolution and improved accessibility. These optimized themes help your apps load faster while maintaining a polished, elegant appearance with minimal overhead.

Step-by-step tutorial: Getting started with React components

Step 1: Create a new Vite project with TypeScript

To begin, create a new Vite project configured for React and TypeScript:

npm create vite@latest
cd my-project 
npm install

Note: For more details on creating a React Vite application, refer to the documentation.

Step 2: Install the Syncfusion® React Button component

Once your Vite project is ready, install the Syncfusion® React package:

npm install @syncfusion/react-buttons

Step 3: Import required CSS references

To apply the correct style for the Button component, import the necessary CSS files in src/App.css.

@import '../node_modules/@syncfusion/react-base/styles/material3.css';
@import '../node_modules/@syncfusion/react-buttons/styles/material3.css';

Next, import and use the Button components in your application.

import React from 'react';
import { Button } from '@syncfusion/react-buttons';
function App() {
  return (
    <>
      <Button>Default Button</Button>
    </>
  );
}
export default App;

Step 4: Add state management to the button

Now, enhance the component by adding a counter using React state:

import { useState } from 'react';
import { Button, Color, Variant } from '@syncfusion/react-buttons';
function App() {
  // Counter state
  const [count, setCount] = useState(0);
  // Handle counter increment
  const incrementCount = () => {
    setCount(count + 1);
  };
  return (
    <div>
      <h2>Counter Button</h2>
      <p>Count: {count}</p>
      <Button color={Color.Primary} variant={Variant.Filled} onClick={incrementCount}>
        Increment Count
      </Button>
    </div>
  );
}
export default App;

Step 5: Run the application

To view your sample app, run the below command:

npm run dev

The output is displayed below.

Pure React Image output

Ready to experience the difference?

We have included Button, TextBox, TextArea, CheckBox, Chip, ChipList, Dropdown Button, Floating Action Button, Message, Numeric TextBox, Radio Button, Skeleton, Split Button, Toast and Tooltip components.

We invite you to explore the all-new Syncfusion® Pure React components and see the improvements for yourself.

We are planning to release the DataGrid, Chart, and Scheduler components in our upcoming updates. Additionally, we will continue to provide full support and feature enhancements for all EJ2 React components.

If you are an existing customer, you can download the new version of Essential Studio on the License and Downloads page. If you are not a Syncfusion customer, try our 30-day free trial to check out our incredible features.

We’d love to hear your feedback and see what you build! If you have questions, feel free to reach out through our support forum, support portal, or feedback portal. We’re always happy to assist you!

This article was originally published at Syncfusion.com.

0
Subscribe to my newsletter

Read articles from syncfusion directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

syncfusion
syncfusion

Syncfusion provides third-party UI components for React, Vue, Angular, JavaScript, Blazor, .NET MAUI, ASP.NET MVC, Core, WinForms, WPF, UWP and Xamarin.