<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mayank Mahadevwala</title>
    <description>The latest articles on DEV Community by Mayank Mahadevwala (@itsmemyk).</description>
    <link>https://dev.to/itsmemyk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3919930%2Fdc79251d-09cd-4308-93f3-4313699cb8ab.jpeg</url>
      <title>DEV Community: Mayank Mahadevwala</title>
      <link>https://dev.to/itsmemyk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itsmemyk"/>
    <language>en</language>
    <item>
      <title>The Missing Piece in Open-Source React Grids: Real Data Grouping</title>
      <dc:creator>Mayank Mahadevwala</dc:creator>
      <pubDate>Mon, 18 May 2026 06:43:04 +0000</pubDate>
      <link>https://dev.to/itsmemyk/the-missing-piece-in-open-source-react-grids-real-data-grouping-4kg5</link>
      <guid>https://dev.to/itsmemyk/the-missing-piece-in-open-source-react-grids-real-data-grouping-4kg5</guid>
      <description>&lt;p&gt;&lt;strong&gt;react-tree-grid&lt;/strong&gt; v0.5.0 ships a drag-panel grouping UI that most paid libraries still don't get right.&lt;/p&gt;




&lt;p&gt;If you've spent time evaluating React data grid libraries, you've probably hit the same wall.&lt;/p&gt;

&lt;p&gt;You need grouping. You search the docs. You find one of two things: either it's not supported at all, or there's a bare groupBy prop that dumps your data into flat,&lt;br&gt;
  non-interactive buckets — no drag UI, no reordering, no per-group sort control. Just rows with a label slapped on top.&lt;/p&gt;

&lt;p&gt;That's not grouping. That's a workaround.&lt;/p&gt;

&lt;p&gt;We built react-tree-grid to be a serious open-source alternative to DHTMLX TreeGrid — and grouping was the feature that had to be done properly.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dshfrwa9zanx1scouxw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dshfrwa9zanx1scouxw.gif" alt="Grid grouping feature" width="760" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drag columns into the group panel, reorder chips, toggle sort direction per group level — all live.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's in the v0.5.0 grouping feature
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Drag any column header into the "Group by" panel above the grid to add a grouping level&lt;/li&gt;
&lt;li&gt;Multi-level nesting — each chip adds one indented level, so you can group by species, then status, then region&lt;/li&gt;
&lt;li&gt;Per-chip sort toggle — each group level has its own independent sort direction (↕ idle / ↑ asc / ↓ desc), separate from column-header sorting&lt;/li&gt;
&lt;li&gt;Expand and collapse individual groups via a chevron; groups show a live row count (e.g. Dog (43))&lt;/li&gt;
&lt;li&gt;One prop to enable all of it: groupable
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;Grid
    columns={columns}
    data={data}
    groupable
    group={{ order: ['animal_type', 'status'] }}
  /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also control grouping programmatically via groupBy() and clearGroups() on the grid API, and hook into onBeforeGroupChange / onGroupChange events.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;Most grouping implementations treat it as a display concern — a post-render transformation that reorganizes rows. The result is brittle: sorting breaks grouping,&lt;br&gt;
  reordering isn't supported, and the UI gives users no affordance to understand what's happening.&lt;/p&gt;

&lt;p&gt;We designed grouping as a first-class data operation. Sort state is preserved when you drag a column into the panel. Group order is fully draggable. Each level is&lt;br&gt;
  independently collapsible. The panel is an honest representation of the data structure, not a cosmetic layer over it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;npm install &lt;a class="mentioned-user" href="https://dev.to/itsmemyk"&gt;@itsmemyk&lt;/a&gt;/react-tree-grid&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero runtime dependencies — React is the only peer&lt;/li&gt;
&lt;li&gt;Full TypeScript support&lt;/li&gt;
&lt;li&gt;MIT license&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Live demo → &lt;a href="https://itsmemyk.github.io/react-tree-grid/?path=/story/grid--grouping" rel="noopener noreferrer"&gt;https://itsmemyk.github.io/react-tree-grid/?path=/story/grid--grouping&lt;/a&gt;&lt;br&gt;
  Documentation → &lt;a href="https://itsmemyk.github.io/react-tree-grid/docs/" rel="noopener noreferrer"&gt;https://itsmemyk.github.io/react-tree-grid/docs/&lt;/a&gt;&lt;br&gt;
  GitHub → &lt;a href="https://github.com/itsmemyk/react-tree-grid" rel="noopener noreferrer"&gt;https://github.com/itsmemyk/react-tree-grid&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>I built an open-source React data grid with zero dependencies</title>
      <dc:creator>Mayank Mahadevwala</dc:creator>
      <pubDate>Fri, 08 May 2026 11:20:12 +0000</pubDate>
      <link>https://dev.to/itsmemyk/i-built-an-open-source-react-data-grid-with-zero-dependencies-2lk</link>
      <guid>https://dev.to/itsmemyk/i-built-an-open-source-react-data-grid-with-zero-dependencies-2lk</guid>
      <description>&lt;p&gt;I've been working on &lt;strong&gt;react-tree-grid&lt;/strong&gt; — an open-source, zero-dependency component library for React 18+ that provides three components: Grid, Tree and TreeGrid.                                             &lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it
&lt;/h2&gt;

&lt;p&gt;Most React data grid libraries either come with a heavy dependency footprint are locked behind a commercial license, or don't support hierarchical data out of the box. I wanted something that was fully open-source, lightweight and covered all three use cases — flat grids, tree lists, and tree grids in a single package.                        &lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Grid&lt;/strong&gt; — a flat tabular data grid with:                                                                                                                                  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virtual scrolling (100,000+ rows)
&lt;/li&gt;
&lt;li&gt;Inline editing (input, select, checkbox, combo, date picker)&lt;/li&gt;
&lt;li&gt;Sorting and header filters (input, select, combo)
&lt;/li&gt;
&lt;li&gt;Drag-and-drop row and column reorder
&lt;/li&gt;
&lt;li&gt;Frozen columns (left and right)
&lt;/li&gt;
&lt;li&gt;Rowspan and colspan
&lt;/li&gt;
&lt;li&gt;Footer aggregates (sum, avg, count, min, max)
&lt;/li&gt;
&lt;li&gt;Light/dark theming via CSS custom properties
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tree&lt;/strong&gt; — a file-explorer style hierarchy with:                                                                                                                           &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expand/collapse
&lt;/li&gt;
&lt;li&gt;Checkboxes&lt;/li&gt;
&lt;li&gt;Drag-and-drop reorder
&lt;/li&gt;
&lt;li&gt;Inline label editing
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TreeGrid&lt;/strong&gt; — hierarchical rows inside a data grid:      &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parent/child rows with expand toggle
&lt;/li&gt;
&lt;li&gt;All Grid features apply&lt;/li&gt;
&lt;li&gt;Grouping via &lt;code&gt;groupBy&lt;/code&gt; prop
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;## Installation                                                                                                                                                            &lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
  npm install @itsmemyk/react-tree-grid                                                                                                                                      

  Quick example                           

  import { TreeGrid } from '@itsmemyk/react-tree-grid/treegrid'                                                                                                              
  import { ThemeProvider } from '@itsmemyk/react-tree-grid'
  import type { GridColumn } from '@itsmemyk/react-tree-grid/grid'                                                                                                           
  import type { TreeGridRow } from '@itsmemyk/react-tree-grid/treegrid'

  interface OrgRow extends TreeGridRow {  
    name: string                                                                                                                                                             
    role: string                                                                                                                                                             
  }                                                                                                                                                                          

  const columns: GridColumn&amp;lt;OrgRow&amp;gt;[] = [                                                                                                                                    
    { id: 'name', header: [{ text: 'Name' }], width: 200 },
    { id: 'role', header: [{ text: 'Role' }], width: 160 },                                                                                                                  
  ]                                                         

  const data: OrgRow[] = [                                                                                                                                                   
    { id: 'ceo', name: 'Alice', role: 'CEO', $opened: true },
    { id: 'cto', name: 'Bob', role: 'CTO', parent: 'ceo' },                                                                                                                  
    { id: 'fe', name: 'Carol', role: 'Frontend Lead', parent: 'cto' },
  ]                                       

  export function App() {                                                                                                                                                    
    return (                                                                                                                                                                 
      &amp;lt;ThemeProvider theme="light"&amp;gt;                                                                                                                                          
        &amp;lt;TreeGrid                                           
          columns={columns}                                                                                                                                                  
          data={data}                                       
          treeColumnId="name"
          style={{ width: 400, height: 240 }} 
        /&amp;gt;                                
      &amp;lt;/ThemeProvider&amp;gt;
    )                                                                                                                                                                        
  }                                       

  Theming                                                                                                                                                                    

  Wrap your app with ThemeProvider and override any design token:                                                                                                            

  &amp;lt;ThemeProvider
    theme="light"                                                                                                                                                            
    overrides={{ colorPrimary: '#e91e63', fontFamily: 'Inter, sans-serif' }}
  &amp;gt;                                                                                                                                                                          
    {/* components */}                                      
  &amp;lt;/ThemeProvider&amp;gt;                        

  All tokens are exposed as CSS custom properties (--react-tree-grid-*) so                                                                                                   
  you can use them in your own styles too.                                                                                                                                   

  TypeScript                                                                                                                                                                 

  Types are fully bundled — no @types/ package needed. Sub-path imports                                                                                                      
  allow tree-shaking individual components:                                                                                                                                  

  import { Grid } from '@itsmemyk/react-tree-grid/grid'                                                                                                                      
  import { Tree } from '@itsmemyk/react-tree-grid/tree'     
  import { TreeGrid } from '@itsmemyk/react-tree-grid/treegrid'                                                                                                              

  Links                                                                                                                                                                      

  - 📦 npm: npmjs.com/package/@itsmemyk/react-tree-grid
  - 📖 Docs: itsmemyk.github.io/react-tree-grid/docs                                                                                                                         
  - 💻 GitHub: github.com/itsmemyk/react-tree-grid          
  - 🎮 Live demo: itsmemyk.github.io/react-tree-grid                                                                                                                         

  Would love feedback — happy to answer questions in the comments!                                                                                                           
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
