{"id":4791,"date":"2026-05-17T21:33:58","date_gmt":"2026-05-17T16:03:58","guid":{"rendered":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/"},"modified":"2026-05-17T21:33:58","modified_gmt":"2026-05-17T16:03:58","slug":"what-is-react-a-beginners-guide-to-the-js-library","status":"publish","type":"post","link":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/","title":{"rendered":"What is React? A Beginner&#8217;s Guide to the JS Library"},"content":{"rendered":"<p>text<br \/>\n$ du -sh node_modules<br \/>\n428M    node_modules<\/p>\n<p>$ top -p $(pgrep -d &#8216;,&#8217; node)<br \/>\nPID    USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND<br \/>\n12842  silas     20   0  1.244g 312.4m  45.2m S   4.2   1.9   0:18.42 node<\/p>\n<pre class=\"codehilite\"><code>I have spent the last three decades working with the 8051, the AVR, and various ARM Cortex-M cores. I am accustomed to fighting for every single byte of SRAM. I have written bootloaders that fit into 512 bytes of flash. I have optimized interrupt service routines to execute in under twenty clock cycles because the timing of a motor controller depends on it. Yesterday, my CTO informed me that our legacy industrial control interface\u2014a rock-solid, C-based serial protocol that has functioned without a single bit-flip since 1998\u2014is &quot;outdated.&quot; He wants a &quot;modern, responsive web dashboard.&quot; \n\nHe told me to look into &quot;React.&quot;\n\nAfter forty-eight hours of staring into this abyss, I have come to the realization that the modern web is not a feat of engineering; it is a house of cards built atop a landfill. We have traded deterministic execution and memory safety for a bloated, non-deterministic stack of abstractions that would make a mainframe cry. I have been asked to document my findings. Here is my report on the absolute state of &quot;modern&quot; software development.\n\n## What is React? A Layer of Grease on a Broken Axle\n\nTo answer the question &quot;what is react&quot; is to describe a solution to a problem that should never have existed. In the embedded world, if I want to update a display, I write a value to a memory-mapped I\/O register. The hardware reflects that change instantly. In the browser, you have the Document Object Model (DOM). The DOM is a tree structure so inefficient and slow that developers had to invent a &quot;Virtual&quot; version of it just to keep the UI from stuttering like a damaged stepper motor.\n\nReact v18.3.1 is, at its core, a &quot;declarative&quot; library. In the vocabulary of people who don't have to worry about stack overflows, &quot;declarative&quot; means &quot;I will tell the computer what I want, and I will pray the library figures out the most efficient way to do it.&quot; As an engineer, I find this offensive. I don't want to &quot;declare&quot; my state; I want to manage it. React sits between the developer and the browser, intercepting every change and running a &quot;reconciliation&quot; algorithm that consumes more CPU cycles than a PID loop running at 10kHz.\n\nIt is a dependency nightmare. To get a &quot;Hello World&quot; running in Node v20.11.0, I had to download 428 megabytes of JavaScript files. For context, the entire Apollo 11 guidance computer source code is about 40 kilobytes. We are using half a gigabyte of disk space to render a text string in a browser. We have lost our way.\n\n## The Virtual DOM: Solving Problems We Didn't Have\n\nThe &quot;Virtual DOM&quot; is the primary selling point of React. The marketing\u2014which I will ignore\u2014claims it makes updates fast. Let\u2019s look at the reality. When a piece of &quot;state&quot; changes, React creates an entirely new virtual tree of the UI. It then compares this new tree with the old tree (a process called &quot;diffing&quot;) to find out which parts of the actual DOM need to be updated.\n\nImagine if I did this in an embedded system. Imagine if, to turn on a single LED on a control panel, I first had to create a virtual map of every LED, compare it to the previous map, calculate the difference, and then finally send the command to the GPIO port. The watchdog timer would reset the system before I even finished the comparison. \n\nThis &quot;reconciliation&quot; is a massive waste of resources. It is an admission that the underlying platform (the browser) is too slow to handle direct manipulation. Instead of fixing the platform, we\u2019ve added a massive, memory-hungry middleman. They call it &quot;efficient.&quot; I call it a resource leak disguised as a feature.\n\n## JSX: A Syntax Error Disguised as a Feature\n\nIn C, we have a clear separation between logic and data. In React, they use something called JSX. It looks like HTML, but it lives inside your JavaScript. It\u2019s a pre-processor\u2019s nightmare. You are essentially writing tags inside your logic, which then get transpiled by something called Babel into a series of `React.createElement()` calls.\n\nWhy? Why are we mixing concerns? If I put assembly instructions inside a string in a C file and expected the compiler to just &quot;figure it out,&quot; I\u2019d be fired. But in the web world, this is considered &quot;best practice.&quot; It makes the code unreadable and requires a massive build pipeline just to turn it into something the browser can actually execute.\n\n## Code Comparison 1: State Management\n\nLet\u2019s look at how we handle a simple toggle switch.\n\n**The C Way (Embedded):**\n```c\n\/\/ Direct, deterministic, uses 1 bit of memory.\nvolatile uint8_t system_flags;\n#define PUMP_BIT 0\n\nvoid toggle_pump() {\n    system_flags ^= (1 &lt;&lt; PUMP_BIT);\n    update_hardware_output(system_flags);\n}\n<\/code><\/pre>\n<p><strong>The React Way (Hooks):<\/strong><\/p>\n<pre class=\"codehilite\"><code class=\"language-javascript\">\/\/ Indirect, non-deterministic, involves closures, objects, and garbage collection.\nimport React, { useState } from 'react';\n\nfunction PumpControl() {\n  const [isPumpOn, setIsPumpOn] = useState(false);\n\n  const togglePump = () =&gt; {\n    setIsPumpOn(prevState =&gt; !prevState);\n  };\n\n  return (\n    &lt;button onClick={togglePump}&gt;\n      {isPumpOn ? 'Stop Pump' : 'Start Pump'}\n    &lt;\/button&gt;\n  );\n}\n<\/code><\/pre>\n<p>In the C version, I know exactly where that bit is. I know when it changes. In the React version, <code>useState<\/code> triggers a re-render of the entire component. The <code>togglePump<\/code> function is re-created on every render unless I wrap it in another abstraction called <code>useCallback<\/code>. We are generating garbage for the Garbage Collector to clean up every time a user clicks a button. It\u2019s a disgrace.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a0a0b4ad1dda\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a0a0b4ad1dda\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#The_State_of_%E2%80%9CState%E2%80%9D_Race_Conditions_by_Design\" >The State of &#8220;State&#8221;: Race Conditions by Design<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Code_Comparison_2_Side_Effects_and_Interrupts\" >Code Comparison 2: Side Effects and Interrupts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#The_Build_Pipeline_A_Rube_Goldberg_Machine\" >The Build Pipeline: A Rube Goldberg Machine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Agonizing_Detail_The_Boilerplate_File_Structure\" >Agonizing Detail: The Boilerplate File Structure<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Code_Comparison_3_Conditional_Rendering\" >Code Comparison 3: Conditional Rendering<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#The_%E2%80%9CHooks%E2%80%9D_Nightmare_useMemo_and_useCallback\" >The &#8220;Hooks&#8221; Nightmare: useMemo and useCallback<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Tailwind_and_CSS-in-JS_The_Final_Insult\" >Tailwind and CSS-in-JS: The Final Insult<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#The_Reconciliation_Algorithm_A_Deeply_Inefficient_Register_Update\" >The Reconciliation Algorithm: A Deeply Inefficient Register Update<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Memory_Leaks_and_the_%E2%80%9CState%E2%80%9D_of_the_Art\" >Memory Leaks and the &#8220;State&#8221; of the Art<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Final_Thoughts_on_%E2%80%9CWhat_is_React%E2%80%9D\" >Final Thoughts on &#8220;What is React&#8221;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#Related_Articles\" >Related Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"The_State_of_%E2%80%9CState%E2%80%9D_Race_Conditions_by_Design\"><\/span>The State of &#8220;State&#8221;: Race Conditions by Design<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>React manages &#8220;State,&#8221; but it does so asynchronously. When you call <code>setState<\/code>, it doesn&#8217;t happen immediately. It\u2019s &#8220;scheduled.&#8221; For someone who deals with real-time interrupts, this is terrifying. You have no guarantee of when the UI will reflect the actual state of the system.<\/p>\n<p>In a control system, if the pressure sensor hits a limit, I need the relief valve to open <em>now<\/em>. I don&#8217;t want the valve to open &#8220;at the next available animation frame&#8221; or &#8220;whenever the reconciliation algorithm finishes diffing the fiber tree.&#8221; React\u2019s state management is built for social media feeds, not for engineering. It introduces a layer of latency that is inherent to its design.<\/p>\n<p>Furthermore, the &#8220;State&#8221; is often duplicated across the entire application. You have local state, &#8220;Context&#8221; state, and often a third-party library like Redux for &#8220;Global&#8221; state. It\u2019s a recipe for race conditions. I\u2019ve seen React apps where the UI shows a &#8220;Loading&#8221; spinner while the underlying data has already arrived, simply because a &#8220;hook&#8221; didn&#8217;t trigger correctly.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Code_Comparison_2_Side_Effects_and_Interrupts\"><\/span>Code Comparison 2: Side Effects and Interrupts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In embedded, we use interrupts for side effects. It\u2019s clean. It\u2019s hardware-level.<\/p>\n<p><strong>The C Way:<\/strong><\/p>\n<pre class=\"codehilite\"><code class=\"language-c\">\/\/ Hardware triggers this when data arrives on the UART\nvoid __attribute__((interrupt)) UART_RX_ISR() {\n    uint8_t data = UDR0;\n    process_incoming_byte(data);\n}\n<\/code><\/pre>\n<p><strong>The React Way (useEffect):<\/strong><\/p>\n<pre class=\"codehilite\"><code class=\"language-javascript\">\/\/ This runs... eventually. Maybe too often. Maybe not enough.\nuseEffect(() =&gt; {\n  const socket = new WebSocket('ws:\/\/control-system.local');\n  socket.onmessage = (event) =&gt; {\n    setData(JSON.parse(event.data));\n  };\n  return () =&gt; socket.close();\n}, []); \/\/ Empty dependency array means &quot;run once,&quot; unless it doesn't.\n<\/code><\/pre>\n<p>The <code>useEffect<\/code> hook is React\u2019s answer to lifecycle management. It is notoriously difficult to get right. If you forget a dependency in the array, your effect uses stale data. If you include too many, it runs in an infinite loop, pegging the CPU at 100% and crashing the browser tab. It\u2019s a high-level abstraction that manages to be more dangerous than a raw pointer.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_Build_Pipeline_A_Rube_Goldberg_Machine\"><\/span>The Build Pipeline: A Rube Goldberg Machine<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To run a React application, you don&#8217;t just &#8220;run&#8221; it. You have to build it. This involves:<br \/>\n1. <strong>NPM\/Yarn:<\/strong> To fetch thousands of dependencies.<br \/>\n2. <strong>Babel:<\/strong> To transpile JSX and modern JS into older JS.<br \/>\n3. <strong>Webpack\/Vite:<\/strong> To bundle these thousands of files into a few massive ones.<br \/>\n4. <strong>Minifiers:<\/strong> To strip out the whitespace because the code is so bloated it won&#8217;t load otherwise.<\/p>\n<p>In my world, a &#8220;build&#8221; takes three seconds and produces a <code>.hex<\/code> file. In the React world, a build takes three minutes, consumes 2GB of RAM, and produces a &#8220;dist&#8221; folder that is larger than the entire operating system I\u2019m using to write this report. <\/p>\n<p>I looked at the <code>package-lock.json<\/code> file. It is 14,000 lines long. It contains references to packages like <code>is-odd<\/code> and <code>is-number<\/code>. Have we forgotten how to use the modulo operator? Why does a UI library need a dependency tree that looks like a map of the human genome?<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Agonizing_Detail_The_Boilerplate_File_Structure\"><\/span>Agonizing Detail: The Boilerplate File Structure<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you run <code>npx create-react-app<\/code>, it generates a directory structure that is an affront to minimalism. Let\u2019s break down the &#8220;Standard&#8221; boilerplate:<\/p>\n<ul>\n<li><code>node_modules\/<\/code>: A black hole containing 30,000 files. This is where your disk space goes to die. It contains everything from testing frameworks to utility functions that check if a string is empty.<\/li>\n<li><code>public\/<\/code>:\n<ul>\n<li><code>index.html<\/code>: The only real file in the whole mess. It\u2019s usually empty, containing a single <code>&lt;div id=\"root\"&gt;&lt;\/div&gt;<\/code>. React then injects the entire application into this div like a parasite.<\/li>\n<li><code>favicon.ico<\/code>: An icon.<\/li>\n<li><code>manifest.json<\/code>: Metadata for &#8220;Progressive Web Apps,&#8221; a term that implies the web is normally regressive.<\/li>\n<\/ul>\n<\/li>\n<li><code>src\/<\/code>:\n<ul>\n<li><code>App.css<\/code>: Global styles. Because we can&#8217;t just use standard CSS, we have to import it into a JavaScript file.<\/li>\n<li><code>App.js<\/code>: The &#8220;root&#8221; component. Usually a mess of JSX.<\/li>\n<li><code>App.test.js<\/code>: A file for testing, which most developers seem to ignore based on the quality of the web today.<\/li>\n<li><code>index.css<\/code>: More styles.<\/li>\n<li><code>index.js<\/code>: The entry point. This is where <code>ReactDOM.createRoot<\/code> is called.<\/li>\n<li><code>reportWebVitals.js<\/code>: A script to measure how slow your app is. The irony is palpable.<\/li>\n<li><code>setupTests.js<\/code>: More configuration for the testing suite.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Every one of these files has its own set of dependencies. Every one of these files adds to the cognitive load. In a C project, I have <code>main.c<\/code>, <code>hardware.c<\/code>, <code>hardware.h<\/code>, and a <code>Makefile<\/code>. I can hold the entire architecture in my head. With React, I need a map and a flashlight just to find where the button click is handled.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Code_Comparison_3_Conditional_Rendering\"><\/span>Code Comparison 3: Conditional Rendering<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>The C Way:<\/strong><\/p>\n<pre class=\"codehilite\"><code class=\"language-c\">if (temperature &gt; 100) {\n    display_alert(&quot;OVERHEAT&quot;);\n} else {\n    display_status(&quot;OK&quot;);\n}\n<\/code><\/pre>\n<p><strong>The React Way:<\/strong><\/p>\n<pre class=\"codehilite\"><code class=\"language-javascript\">return (\n  &lt;div&gt;\n    {temperature &gt; 100 ? (\n      &lt;AlertComponent message=&quot;OVERHEAT&quot; \/&gt;\n    ) : (\n      &lt;StatusComponent message=&quot;OK&quot; \/&gt;\n    )}\n  &lt;\/div&gt;\n);\n<\/code><\/pre>\n<p>While the React code looks &#8220;cleaner&#8221; to some, it\u2019s deceptive. <code>AlertComponent<\/code> and <code>StatusComponent<\/code> are functions. In the React version, both branches of that ternary operator involve function calls, object creation, and potential re-renders of child components. In C, it\u2019s a simple branch instruction at the CPU level. The overhead of the React approach is orders of magnitude higher for the exact same result.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_%E2%80%9CHooks%E2%80%9D_Nightmare_useMemo_and_useCallback\"><\/span>The &#8220;Hooks&#8221; Nightmare: useMemo and useCallback<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Because React is so inefficient at managing its own rendering, it provides &#8220;optimization&#8221; hooks like <code>useMemo<\/code> and <code>useCallback<\/code>. These are essentially manual cache management. <\/p>\n<p>If you have a heavy calculation, you wrap it in <code>useMemo<\/code> so React doesn&#8217;t re-run it on every render. But wait\u2014you have to manually manage the dependency array for that cache. If you miss one, your cache is stale. If you include a new object, the cache is busted anyway because of how JavaScript handles object equality.<\/p>\n<p>This is what happens when you try to hide the reality of the machine from the developer. You end up creating a new, more complex set of rules that the developer has to follow to prevent the abstraction from collapsing. It\u2019s like trying to fix a leaky pipe by wrapping it in a second, larger pipe that also leaks.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tailwind_and_CSS-in-JS_The_Final_Insult\"><\/span>Tailwind and CSS-in-JS: The Final Insult<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>As if the JavaScript wasn&#8217;t enough, we now have &#8220;Tailwind CSS.&#8221; Instead of writing CSS in a CSS file, you write &#8220;utility classes&#8221; directly in your JSX. <\/p>\n<p><code>className=\"flex items-center justify-between p-4 bg-blue-500 text-white rounded-lg shadow-md\"<\/code><\/p>\n<p>This is just inline styling with more steps. It turns the HTML (or JSX) into an unreadable wall of text. It\u2019s the equivalent of writing a C program where every variable name is a description of its memory address and its color on a debug screen. It\u2019s a rejection of the &#8220;Separation of Concerns&#8221; principle that we\u2019ve spent decades refining.<\/p>\n<p>And then there\u2019s &#8220;Styled Components,&#8221; where you write your CSS <em>inside<\/em> a JavaScript template literal. So now you have CSS inside JS inside HTML-like tags. It\u2019s a nesting doll of bad ideas. The build tool then has to parse all of this, extract the CSS, and inject it back into the DOM at runtime. The CPU usage on my laptop spikes just thinking about it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_Reconciliation_Algorithm_A_Deeply_Inefficient_Register_Update\"><\/span>The Reconciliation Algorithm: A Deeply Inefficient Register Update<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let&#8217;s talk about &#8220;Fiber.&#8221; React v16 introduced the Fiber architecture to allow for &#8220;concurrent rendering.&#8221; This means React can pause its diffing algorithm to let the browser do something else, like handle a mouse click.<\/p>\n<p>In the embedded world, we call this &#8220;preemptive multitasking,&#8221; and we\u2019ve had it since the 1970s. React has implemented a software-level scheduler to manage its own bloat. It\u2019s a complex system of linked lists and work loops designed to hide the fact that the reconciliation process is too heavy to run in a single pass without freezing the UI.<\/p>\n<p>When you update a &#8220;prop&#8221; (a read-only variable passed to a component), React marks that component as &#8220;dirty.&#8221; It then traverses the tree, checking every child to see if it also needs to be updated. This is a recursive process that, even with the &#8220;Fiber&#8221; optimizations, is incredibly taxing compared to a simple memory write. We are using a supercomputer to do the work of a pocket calculator, and we\u2019re doing it badly.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Memory_Leaks_and_the_%E2%80%9CState%E2%80%9D_of_the_Art\"><\/span>Memory Leaks and the &#8220;State&#8221; of the Art<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>JavaScript is garbage-collected, which gives web developers a false sense of security. In React, it is incredibly easy to create memory leaks. If you set up a <code>setInterval<\/code> in a <code>useEffect<\/code> and forget to return a cleanup function, that interval will run forever, even after the component is unmounted. <\/p>\n<p>Because everything in React is a closure, these intervals and event listeners keep references to the component\u2019s state and props, preventing the Garbage Collector from freeing that memory. I\u2019ve seen &#8220;modern&#8221; web dashboards that consume 2GB of RAM after being left open for a few hours. A 64KB microcontroller would have crashed in seconds, but because modern PCs have 32GB of RAM, we just ignore the leak. It\u2019s lazy engineering.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Final_Thoughts_on_%E2%80%9CWhat_is_React%E2%80%9D\"><\/span>Final Thoughts on &#8220;What is React&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>What is React? It is a monument to our own excess. It is a library that provides a &#8220;declarative&#8221; interface by consuming vast amounts of memory and CPU cycles to manage a DOM that was never designed for high-performance UIs. It is a system that requires a 400MB toolchain to produce a 2MB bundle to display 10KB of data.<\/p>\n<p>It is the opposite of everything I have learned in thirty years of engineering. It is non-deterministic, it is opaque, and it is fragile. The CTO says we need it for &#8220;developer productivity.&#8221; I say if your developers need 428MB of dependencies to be productive, you have the wrong developers.<\/p>\n<p>I am going back to Vim. I have a bootloader to write, and I only have 128 bytes of overhead left. I don&#8217;t have room for a Virtual DOM, and frankly, I don&#8217;t need one. If the &#8220;modern web&#8221; is the future, I\u2019m glad I\u2019m nearing retirement.<\/p>\n<pre class=\"codehilite\"><code class=\"language-c\">\/\/ Real code. No hooks. No fibers. No bloat.\nvoid main() {\n    init_hardware();\n    while(1) {\n        if (data_ready) {\n            process_data();\n        }\n        sleep_mode();\n    }\n}\n<\/code><\/pre>\n<p>Done. I\u2019m turning off this Node server before my fan takes flight.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Related_Articles\"><\/span>Related Articles<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Explore more insights and best practices:<\/p>\n<ul>\n<li><a href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\">The Ultimate Kubectl Cheat Sheet You Ever Need<\/a><\/li>\n<li><a href=\"https:\/\/itsupportwale.com\/blog\/latest-artificial-intelligence-news-top-trends-and-updates\/\">Latest Artificial Intelligence News Top Trends And Updates<\/a><\/li>\n<li><a href=\"https:\/\/itsupportwale.com\/blog\/pssh-execute-ssh-commands-on-multiple-systems-using-single-command\/\">Pssh Execute Ssh Commands On Multiple Systems Using Single Command<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>text $ du -sh node_modules 428M node_modules $ top -p $(pgrep -d &#8216;,&#8217; node) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12842 silas 20 0 1.244g 312.4m 45.2m S 4.2 1.9 0:18.42 node I have spent the last three decades working with the 8051, the AVR, and various ARM Cortex-M &#8230; <a title=\"What is React? A Beginner&#8217;s Guide to the JS Library\" class=\"read-more\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\" aria-label=\"Read more  on What is React? A Beginner&#8217;s Guide to the JS Library\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4791","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is React? A Beginner&#039;s Guide to the JS Library - ITSupportWale<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is React? A Beginner&#039;s Guide to the JS Library - ITSupportWale\" \/>\n<meta property=\"og:description\" content=\"text $ du -sh node_modules 428M node_modules $ top -p $(pgrep -d &#8216;,&#8217; node) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12842 silas 20 0 1.244g 312.4m 45.2m S 4.2 1.9 0:18.42 node I have spent the last three decades working with the 8051, the AVR, and various ARM Cortex-M ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\" \/>\n<meta property=\"og:site_name\" content=\"ITSupportWale\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-17T16:03:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/android-chrome-512x512-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Techie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Techie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\"},\"author\":{\"name\":\"Techie\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\"},\"headline\":\"What is React? A Beginner&#8217;s Guide to the JS Library\",\"datePublished\":\"2026-05-17T16:03:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\"},\"wordCount\":1674,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\",\"name\":\"What is React? A Beginner's Guide to the JS Library - ITSupportWale\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\"},\"datePublished\":\"2026-05-17T16:03:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itsupportwale.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is React? A Beginner&#8217;s Guide to the JS Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"name\":\"ITSupportWale\",\"description\":\"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides\",\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\",\"name\":\"itsupportwale\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"width\":1119,\"height\":144,\"caption\":\"itsupportwale\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\",\"name\":\"Techie\",\"sameAs\":[\"https:\/\/itsupportwale.com\",\"iswblogadmin\"],\"url\":\"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is React? A Beginner's Guide to the JS Library - ITSupportWale","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/","og_locale":"en_US","og_type":"article","og_title":"What is React? A Beginner's Guide to the JS Library - ITSupportWale","og_description":"text $ du -sh node_modules 428M node_modules $ top -p $(pgrep -d &#8216;,&#8217; node) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12842 silas 20 0 1.244g 312.4m 45.2m S 4.2 1.9 0:18.42 node I have spent the last three decades working with the 8051, the AVR, and various ARM Cortex-M ... Read more","og_url":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/","og_site_name":"ITSupportWale","article_publisher":"https:\/\/www.facebook.com\/Itsupportwale-298547177495978","article_published_time":"2026-05-17T16:03:58+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2021\/05\/android-chrome-512x512-1.png","type":"image\/png"}],"author":"Techie","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Techie","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#article","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/"},"author":{"name":"Techie","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d"},"headline":"What is React? A Beginner&#8217;s Guide to the JS Library","datePublished":"2026-05-17T16:03:58+00:00","mainEntityOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/"},"wordCount":1674,"commentCount":0,"publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/","url":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/","name":"What is React? A Beginner's Guide to the JS Library - ITSupportWale","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/#website"},"datePublished":"2026-05-17T16:03:58+00:00","breadcrumb":{"@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/itsupportwale.com\/blog\/what-is-react-a-beginners-guide-to-the-js-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsupportwale.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is React? A Beginner&#8217;s Guide to the JS Library"}]},{"@type":"WebSite","@id":"https:\/\/itsupportwale.com\/blog\/#website","url":"https:\/\/itsupportwale.com\/blog\/","name":"ITSupportWale","description":"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides","publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itsupportwale.com\/blog\/#organization","name":"itsupportwale","url":"https:\/\/itsupportwale.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","width":1119,"height":144,"caption":"itsupportwale"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Itsupportwale-298547177495978"]},{"@type":"Person","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d","name":"Techie","sameAs":["https:\/\/itsupportwale.com","iswblogadmin"],"url":"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/4791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/comments?post=4791"}],"version-history":[{"count":0,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/4791\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media?parent=4791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/categories?post=4791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/tags?post=4791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}