<?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: Muhammet Kaya</title>
    <description>The latest articles on DEV Community by Muhammet Kaya (@kaya2m).</description>
    <link>https://dev.to/kaya2m</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4244213%2F87e87956-f80d-4715-8134-2309f370f89a.jpg</url>
      <title>DEV Community: Muhammet Kaya</title>
      <link>https://dev.to/kaya2m</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaya2m"/>
    <language>en</language>
    <item>
      <title>One engine, two render layers: how I built the same data grid for Angular and React</title>
      <dc:creator>Muhammet Kaya</dc:creator>
      <pubDate>Sat, 14 Nov 2026 09:17:01 +0000</pubDate>
      <link>https://dev.to/kaya2m/one-engine-two-render-layers-how-i-built-the-same-data-grid-for-angular-and-react-32c5</link>
      <guid>https://dev.to/kaya2m/one-engine-two-render-layers-how-i-built-the-same-data-grid-for-angular-and-react-32c5</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqarjlpobizqr5hypsmir.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqarjlpobizqr5hypsmir.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A data grid is mostly not rendering. Sorting, filtering, grouping, virtualization windows, range&lt;br&gt;
selection, keyboard navigation, clipboard, undo — none of it needs a framework. Yet most grids are&lt;br&gt;
written inside one, and the "other framework" version is a wrapper that feels foreign.&lt;/p&gt;

&lt;p&gt;I wanted the opposite for &lt;a href="https://github.com/oge-ui/oge-ui" rel="noopener noreferrer"&gt;OGE UI&lt;/a&gt;: one engine with no framework&lt;br&gt;
in it, and a render layer per framework that is native to it. This post is what that looks like in&lt;br&gt;
practice and what it cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  The split
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The engine&lt;/strong&gt; is plain TypeScript. It owns the data source, the filter and sort pipeline, group&lt;br&gt;
trees, the virtualization math, selection and range state, and the keyboard maps. It knows nothing&lt;br&gt;
about Angular or React and has no runtime dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Angular layer&lt;/strong&gt; exposes that state as signals. Every input, output and piece of grid state is&lt;br&gt;
a signal; there are no decorators and no Zone.js. Components are OnPush and mark exactly what&lt;br&gt;
changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The React layer&lt;/strong&gt; is real components with props, callbacks and controlled state. It subscribes&lt;br&gt;
to the engine through &lt;code&gt;useSyncExternalStore&lt;/code&gt;, so concurrent rendering and StrictMode behave.&lt;/p&gt;

&lt;p&gt;Both layers share one stylesheet and one set of CSS design tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get from doing it this way
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Behaviour cannot drift.&lt;/strong&gt; A sorting bug is fixed once. A parity check in CI compares the two
API tables member by member and fails the build when one side gains something the other lacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests are cheap where the logic is.&lt;/strong&gt; Engine specs need no component, no template and no
framework test bed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each framework feels like itself.&lt;/strong&gt; Angular users get template type checking on every column;
React users get render props instead of a template DSL.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Two render layers is two sets of components to write, document and test. The engine removes
the logic duplication, not the work.&lt;/li&gt;
&lt;li&gt;Deciding what belongs in the engine is a judgment call every time. Focus management and popup
positioning ended up in a shared, framework-free "behavior" package; templating never will.&lt;/li&gt;
&lt;li&gt;Idioms do not map one to one. An Angular &lt;code&gt;TemplateRef&lt;/code&gt; becomes a React render prop, and those
deliberate differences have to be written down or they look like bugs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Does it perform?
&lt;/h2&gt;

&lt;p&gt;On 100,000 rows, production build, median of five cold runs on a laptop i7:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;th&gt;Angular&lt;/th&gt;
&lt;th&gt;React&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First render&lt;/td&gt;
&lt;td&gt;197 ms&lt;/td&gt;
&lt;td&gt;168 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filter: equals&lt;/td&gt;
&lt;td&gt;124 ms&lt;/td&gt;
&lt;td&gt;131 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sort: number column&lt;/td&gt;
&lt;td&gt;261 ms&lt;/td&gt;
&lt;td&gt;223 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scroll&lt;/td&gt;
&lt;td&gt;47 fps&lt;/td&gt;
&lt;td&gt;60 fps&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The Angular scroll number is the one I am not satisfied with yet. The script that produced the&lt;br&gt;
table is in the repo, and the &lt;a href="https://www.ogeui.com/benchmarks" rel="noopener noreferrer"&gt;benchmarks page&lt;/a&gt; explains exactly&lt;br&gt;
what is timed, so you can check it on your own machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is free
&lt;/h2&gt;

&lt;p&gt;The grid is MIT, including the parts that are often a paid tier: grouping with summaries, styled&lt;br&gt;
Excel and PDF export, cell ranges with clipboard paste and fill handle, master-detail and&lt;br&gt;
server-side data operations. So are the tree list, 25+ editors, forms and the rich-text editor.&lt;/p&gt;

&lt;p&gt;The project is open-core: pivot, charts, scheduler, gantt, kanban, BPMN and a spreadsheet viewer&lt;br&gt;
are commercial. I would rather say that in the article than have you find it in a licence file.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Live demos, each with an "Open in StackBlitz" button: &lt;a href="https://www.ogeui.com/components/data-grid" rel="noopener noreferrer"&gt;https://www.ogeui.com/components/data-grid&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/oge-ui/oge-ui" rel="noopener noreferrer"&gt;https://github.com/oge-ui/oge-ui&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have built a multi-framework library, I would like to hear where you drew the engine&lt;br&gt;
boundary — it is the decision I have changed my mind about most often.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>angular</category>
      <category>react</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
