Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11To add an interactive pivot table to a React app, install react-pivottable, pass it tabular data, and save every configuration change from its onChange callback in React state. Then pass that saved configuration back to the component. This controlled-state pattern keeps users’ field placements and selections in sync with your app.
Build a basic pivot table with react-pivottable
The react-pivottable project describes a React interface for exploring and summarizing data in tables or charts, using a two-dimensional drag-and-drop layout. For a table-only setup, follow this sequence:
As an Amazon Associate I earn from qualifying purchases.
- Install the package and React dependencies: run
npm install --save react-pivottable react react-dom. - Import the component and stylesheet: import
PivotTableUIfromreact-pivottableandreact-pivottable/pivottable.cssinto your app. - Prepare the records: provide data in a format supported by the component. The project README demonstrates an array of arrays with a header row; check its input-format documentation against the shape of your production data.
- Save configuration changes: in
onChange, store the updated pivot configuration in React state or your application’s state store. - Pass the saved configuration back: spread the current state into
PivotTableUI, along with the data and callback.
The project README calls PivotTableUI a “dumb component”: it keeps essentially no state of its own. Your app therefore needs to retain the configuration and feed it back on each render. Here is the core pattern in a class component:
Free tools Windows power users keep installed
One-click scans. No signup required.
import React from 'react';
import PivotTableUI from 'react-pivottable/PivotTableUI';
import 'react-pivottable/pivottable.css';
class SalesPivot extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<PivotTableUI
data={this.props.data}
onChange={state => this.setState(state)}
{...this.state}
/>
);
}
}
export default SalesPivot;
Give data the records in the component’s supported format. The example leaves the initial configuration empty so the user can arrange fields; you can instead initialize state with a configuration if the view should open in a predefined layout. Keep the callback’s updated configuration in the same state source you spread back into the component.
#1 Best Overall
Add charts only when the interface needs them
Table renderers are enough for a basic integration. The README also documents optional Plotly chart output, which adds dependencies and a build decision:
- Install
react-plotly.jsandplotly.js. - Import the Plotly React component and
TableRenderers, then create Plotly renderers withcreatePlotlyRenderers(Plot). - Pass the table and Plotly renderers together to
PivotTableUI.
The Plotly React component is injected into the renderer setup. For webpack builds, the project README flags Plotly bundling considerations and also shows an option using an external window.Plotly. Check the project documentation for the setup that matches your build; charts are not required for a table-only pivot.
Choose a component based on the analysis users need
A full drag-and-drop pivot interface is not necessary for every grouped table. These options differ in how users arrange data and how much analysis functionality they document:
Recommended Free Tools
| Approach | What the documentation describes | Consider it when |
|---|---|---|
react-pivottable |
Drag-and-drop pivot layout, table summaries, and optional Plotly chart renderers. | Users should move fields around and explore summaries themselves. |
| React Table v6 pivoting | pivotBy, custom aggregation functions, sorting pivoted columns, and filtering. |
Grouped rows and aggregates within a table framework meet the need; users do not require a dedicated drag-and-drop pivot layout. |
| Syncfusion React PivotView | Field reorganization, member filtering, hierarchy drilling, and configurable server-side aggregation, filtering, sorting, and grouping. | The workflow needs broader analysis features, including server-side processing or hierarchy exploration. |
| DevExpress React PivotGrid | Sorting, header filtering, and XLSX export in its getting-started documentation. | Those documented analysis and export controls align with the app’s requirements. |
React Table v6 documentation describes a specific version; verify the intended package version before using its API. For fuller PivotGrid products, verify current licensing, pricing, and compatibility directly with the vendor. The cited documentation supplies feature examples, not a complete current compatibility or pricing matrix: React Table v6 pivoting, Syncfusion React PivotView, and DevExpress React PivotGrid.
Quick Recap
Best Value
Rank #4
Rank #3
Check these requirements before choosing
- Field arrangement: must end users drag fields between rows, columns, and values, or is a fixed grouped table sufficient?
- Analysis depth: do users need custom aggregation, filtering, sorting, or hierarchy drilling?
- Processing location: will the browser process the dataset, or must aggregation and filtering happen server-side?
- Output: is a table enough, or are charts and exports part of the workflow?
- Integration constraints: check compatibility with your React version and build system, especially if adding Plotly.
- Commercial terms: confirm current licensing and pricing for a vendor product before adoption.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




