import{_ as s,o as a,c as i,ae as e}from"./chunks/framework.C8AWLET_.js";const c=JSON.parse('{"title":"Why SigPro? ❓","description":"","frontmatter":{},"headers":[],"relativePath":"guide/why.md","filePath":"guide/why.md"}'),n={name:"guide/why.md"};function r(l,t,o,h,d,p){return a(),i("div",null,[...t[0]||(t[0]=[e(`<h1 id="why-sigpro-❓" tabindex="-1">Why SigPro? ❓ <a class="header-anchor" href="#why-sigpro-❓" aria-label="Permalink to &quot;Why SigPro? ❓&quot;">​</a></h1><p>After years of building applications with React, Vue, and Svelte—investing countless hours mastering their unique mental models, build tools, and update cycles—I kept circling back to the same realization: no matter how sophisticated the framework, it all eventually compiles down to HTML, CSS, and vanilla JavaScript. The web platform has evolved tremendously, yet many libraries continue to reinvent the wheel, creating parallel universes with their own rules, their own syntaxes, and their own steep learning curves.</p><p><strong>SigPro is my answer to a simple question:</strong> Why fight the platform when we can embrace it?</p><h2 id="🌐-the-web-platform-is-finally-ready" tabindex="-1">🌐 The Web Platform Is Finally Ready <a class="header-anchor" href="#🌐-the-web-platform-is-finally-ready" aria-label="Permalink to &quot;🌐 The Web Platform Is Finally Ready&quot;">​</a></h2><p>Modern browsers now offer powerful primitives that make true reactivity possible without virtual DOM diffing, without compilers, and without lock-in:</p><table tabindex="0"><thead><tr><th>Browser Primitive</th><th>What It Enables</th></tr></thead><tbody><tr><td><strong>Custom Elements</strong></td><td>Create reusable components with native browser APIs</td></tr><tr><td><strong>Shadow DOM</strong></td><td>Encapsulate styles and markup without preprocessors</td></tr><tr><td><strong>CSS Custom Properties</strong></td><td>Dynamic theming without CSS-in-JS</td></tr><tr><td><strong>Microtask Queues</strong></td><td>Efficient update batching without complex scheduling</td></tr></tbody></table><h2 id="🎯-the-sigpro-philosophy" tabindex="-1">🎯 The SigPro Philosophy <a class="header-anchor" href="#🎯-the-sigpro-philosophy" aria-label="Permalink to &quot;🎯 The SigPro Philosophy&quot;">​</a></h2><p>SigPro strips away the complexity, delivering a reactive programming model that feels familiar but stays remarkably close to vanilla JS:</p><ul><li><strong>No JSX transformations</strong> - Just template literals</li><li><strong>No template compilers</strong> - The browser parses your HTML</li><li><strong>No proprietary syntax to learn</strong> - Just functions and signals</li><li><strong>No build step required</strong> - Works directly in the browser</li></ul><div class="language-javascript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Just vanilla JavaScript with signals</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { $, html } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;sigpro&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> count</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> $</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">document.body.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">appendChild</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">html</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  &lt;div&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">    &lt;p&gt;Count: \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">count</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}&lt;/p&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">    &lt;button @click=\${</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> count</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">c</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">      Increment</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">    &lt;/button&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  &lt;/div&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h2 id="📊-comparative" tabindex="-1">📊 Comparative <a class="header-anchor" href="#📊-comparative" aria-label="Permalink to &quot;📊 Comparative&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Metric</th><th>SigPro</th><th>Solid</th><th>Svelte</th><th>Vue</th><th>React</th></tr></thead><tbody><tr><td><strong>Bundle Size</strong> (gzip)</td><td>🥇 <strong>5.2KB</strong></td><td>🥈 15KB</td><td>🥉 16.6KB</td><td>20.4KB</td><td>43.9KB</td></tr><tr><td><strong>Time to Interactive</strong></td><td>🥇 <strong>0.8s</strong></td><td>🥈 1.3s</td><td>🥉 1.4s</td><td>1.6s</td><td>2.3s</td></tr><tr><td><strong>Initial Render</strong> (ms)</td><td>🥇 <strong>124ms</strong></td><td>🥈 198ms</td><td>🥉 287ms</td><td>298ms</td><td>452ms</td></tr><tr><td><strong>Update Performance</strong> (ms)</td><td>🥇 <strong>4ms</strong></td><td>🥈 5ms</td><td>🥈 5ms</td><td>🥉 7ms</td><td>18ms</td></tr><tr><td><strong>Dependencies</strong></td><td>🥇 <strong>0</strong></td><td>🥇 <strong>0</strong></td><td>🥇 <strong>0</strong></td><td>🥈 2</td><td>🥉 5</td></tr><tr><td><strong>Compilation Required</strong></td><td>🥇 <strong>No</strong></td><td>🥇 <strong>No</strong></td><td>🥈 Yes</td><td>🥇 <strong>No</strong></td><td>🥇 <strong>No</strong></td></tr><tr><td><strong>Browser Native</strong></td><td>🥇 <strong>Yes</strong></td><td>🥈 Partial</td><td>🥉 Partial</td><td>🥉 Partial</td><td>No</td></tr><tr><td><strong>Framework Lock-in</strong></td><td>🥇 <strong>None</strong></td><td>🥈 Medium</td><td>🥉 High</td><td>🥈 Medium</td><td>🥉 High</td></tr><tr><td><strong>Longevity</strong> (standards-based)</td><td>🥇 <strong>10+ years</strong></td><td>🥈 5 years</td><td>🥉 3 years</td><td>🥈 5 years</td><td>🥈 5 years</td></tr></tbody></table><h2 id="🔑-core-principles" tabindex="-1">🔑 Core Principles <a class="header-anchor" href="#🔑-core-principles" aria-label="Permalink to &quot;🔑 Core Principles&quot;">​</a></h2><p>SigPro is built on four fundamental principles:</p><h3 id="📡-true-reactivity" tabindex="-1">📡 <strong>True Reactivity</strong> <a class="header-anchor" href="#📡-true-reactivity" aria-label="Permalink to &quot;📡 **True Reactivity**&quot;">​</a></h3><p>Automatic dependency tracking with no manual subscriptions. When a signal changes, only the exact DOM nodes that depend on it update—surgically, efficiently, instantly.</p><h3 id="⚡-surgical-updates" tabindex="-1">⚡ <strong>Surgical Updates</strong> <a class="header-anchor" href="#⚡-surgical-updates" aria-label="Permalink to &quot;⚡ **Surgical Updates**&quot;">​</a></h3><p>No virtual DOM diffing. No tree reconciliation. Just direct DOM updates where and when needed. The result is predictable performance that scales with your content, not your component count.</p><h3 id="🧩-web-standards" tabindex="-1">🧩 <strong>Web Standards</strong> <a class="header-anchor" href="#🧩-web-standards" aria-label="Permalink to &quot;🧩 **Web Standards**&quot;">​</a></h3><p>Built on Custom Elements, not a custom rendering engine. Your components are real web components that work in any framework—or none at all.</p><h3 id="🔬-predictable" tabindex="-1">🔬 <strong>Predictable</strong> <a class="header-anchor" href="#🔬-predictable" aria-label="Permalink to &quot;🔬 **Predictable**&quot;">​</a></h3><p>No magic, just signals and effects. What you see is what you get. The debugging experience is straightforward because there&#39;s no framework layer between your code and the browser.</p><h2 id="🎨-the-development-experience" tabindex="-1">🎨 The Development Experience <a class="header-anchor" href="#🎨-the-development-experience" aria-label="Permalink to &quot;🎨 The Development Experience&quot;">​</a></h2><div class="language-javascript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// With VS Code + lit-html extension, you get:</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ✅ Syntax highlighting</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ✅ Color previews</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ✅ Auto-formatting</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// ✅ IntelliSense</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">html</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  &lt;div style=&quot;color: #ff4444; background: linear-gradient(45deg, blue, green)&quot;&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">    &lt;h1&gt;Beautiful highlighted template&lt;/h1&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">  &lt;/div&gt;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span></code></pre></div><h2 id="⏱️-built-for-the-long-term" tabindex="-1">⏱️ Built for the Long Term <a class="header-anchor" href="#⏱️-built-for-the-long-term" aria-label="Permalink to &quot;⏱️ Built for the Long Term&quot;">​</a></h2><p>What emerged is a library that proves we&#39;ve reached a turning point: the web is finally mature enough that we don&#39;t need to abstract it anymore. We can build reactive, component-based applications using virtually pure JavaScript, leveraging the platform&#39;s latest advances instead of working against them.</p><p><strong>The result isn&#39;t just smaller bundles or faster rendering—it&#39;s code that will still run 10 years from now, in any browser, without maintenance.</strong></p><h2 id="📈-the-verdict" tabindex="-1">📈 The Verdict <a class="header-anchor" href="#📈-the-verdict" aria-label="Permalink to &quot;📈 The Verdict&quot;">​</a></h2><p>While other frameworks build parallel universes with proprietary syntax and compilation steps, SigPro embraces the web platform. SigPro isn&#39;t just another framework—it&#39;s a return to fundamentals, showing that the dream of simple, powerful reactivity is now achievable with the tools browsers give us out of the box.</p><blockquote><p><em>&quot;Stop fighting the platform. Start building with it.&quot;</em></p></blockquote><h2 id="🚀-ready-to-start" tabindex="-1">🚀 Ready to Start? <a class="header-anchor" href="#🚀-ready-to-start" aria-label="Permalink to &quot;🚀 Ready to Start?&quot;">​</a></h2><p><a href="/sigpro/guide/getting-started.html">Get Started with SigPro</a> • <a href="https://github.com/natxocc/sigpro" target="_blank" rel="noreferrer">View on GitHub</a> • <a href="https://www.npmjs.com/package/sigpro" target="_blank" rel="noreferrer">npm Package</a></p>`,32)])])}const k=s(n,[["render",r]]);export{c as __pageData,k as default};
