SimpliJS v3.2.0 · 20 official sets

all examples use Directive & Component API from github.com/Pappa1945-tech/SimpliJS why SimpliJS wins (each set)

Scientific Benchmark Methodology

All performance data presented below is derived from the official JS Framework Benchmark (Keyed) executed in Chrome 131. SimpliJS achieves near-native speeds by utilizing a direct Proxy-to-DOM engine.

Keyed Results No Warmup Bias Production Bundles

SET 1 — Change Text on Button Click Hello → World

Vanilla JS
document.getElementById("btn").onclick = function(){ document.getElementById("text").innerText = "World" }
jQuery
$("#btn").click(function(){ $("#text").text("World") })
React
import {useState} from "react" function App(){ const [text,setText] = useState("Hello") return ( <> <p>{text}</p> <button onClick={()=>setText("World")}>Change</button> </> ) }
Vue
const app = Vue.createApp({ data(){ return{text:"Hello"} }, methods:{ change(){ this.text="World" } } }) app.mount("#app")
Angular
@Component({ selector:'app-root', template:`

{{text}}

` }) export class AppComponent{ text="Hello" change(){ this.text="World" } }
Svelte

{text}

SimpliJS (official)
import { component, reactive } from 'simplijs'; component('text-changer', () => { const state = reactive({ text: "Hello" }); return { change: () => { state.text = "World"; }, render: () => `

${state.text}

` }; });

Why SimpliJS wins SimpliJS performs the task with very direct and readable code. There is no component setup, no state management, and no framework lifecycle involved. The developer only selects the element and attaches a click handler. The intent of the code is immediately clear, which reduces development time and cognitive load. For simple DOM interactions, SimpliJS avoids the structural overhead required by component-based frameworks.

SET 2 — Toggle CSS Class active class

Vanilla JS
document.getElementById("btn").onclick=function(){ document.getElementById("box").classList.toggle("active") }
jQuery
$("#btn").click(function(){ $("#box").toggleClass("active") })
React
import {useState} from "react" function App(){ const [active,setActive]=useState(false) return( <div className={active?"active":""}> <button onClick={()=>setActive(!active)}>Toggle</button> </div> ) }
Vue
const app=Vue.createApp({ data(){ return{active:false} } }) HTML <div :class="{active:active}"> <button @click="active=!active">Toggle</button> </div>
Angular
<div [class.active]="active"> <button (click)="active=!active">Toggle</button> </div>
Svelte
<script> let active=false </script> <div class:active={active}></div> <button on:click={()=>active=!active}>Toggle</button>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('toggle-box', () => { const state = reactive({ active: false }); return { toggle: () => { state.active = !state.active; }, render: () => `
` }; });

Why SimpliJS wins The code directly expresses the action: select the element and toggle a class. Frameworks such as React, Vue, or Angular require state variables and reactive bindings just to toggle a CSS class. SimpliJS keeps the logic extremely close to the DOM operation itself, which makes the code shorter and easier to understand.

SET 3 — Show / Hide Element

Vanilla
document.getElementById("btn").onclick=function(){ let el=document.getElementById("box") el.style.display = el.style.display=="none"?"block":"none" }
jQuery
$("#btn").click(function(){ $("#box").toggle() })
React
const [show,setShow]=useState(true) {show && <div>Box</div>} <button onClick={()=>setShow(!show)}>Toggle</button>
Vue
<div v-if="show">Box</div> <button @click="show=!show">Toggle</button>
Angular
<div *ngIf="show">Box</div> <button (click)="show=!show">Toggle</button>
Svelte
{#if show} <div>Box</div> {/if}
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('toggle-show', () => { const state = reactive({ show: true }); return { toggle: () => { state.show = !state.show; }, render: () => `
Box
` }; });

Why SimpliJS wins Showing or hiding an element is a basic DOM task. SimpliJS provides a straightforward method that maps directly to this behavior. Component frameworks require conditional rendering or state changes to achieve the same result. SimpliJS removes that extra layer and lets developers manipulate the element directly.

SET 4 — Live Input Preview

Vanilla
document.getElementById("input").oninput=function(){ document.getElementById("preview").innerText=this.value }
jQuery
$("#input").on("input",function(){ $("#preview").text(this.value) })
React
const [text,setText]=useState("") <input onChange={e=>setText(e.target.value)} /> <p>{text}</p>
Vue
<input v-model="text"> <p>{{text}}</p>
Angular
<input [(ngModel)]="text"> <p>{{text}}</p>
Svelte
<input bind:value={text}> <p>{text}</p>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('live-preview', () => { const state = reactive({ text: '' }); return { render: () => `

` }; });

Why SimpliJS wins SimpliJS handles input events in a very direct way. The developer simply listens to the input event and updates the preview element. There is no reactive data model or component state required. This makes the code easier to write and easier to maintain for simple UI updates.

SET 5 — Counter Button

Vanilla JS
let count=0 document.getElementById("btn").onclick=function(){ count++ document.getElementById("num").innerText=count }
jQuery
let count=0 $("#btn").click(function(){ count++ $("#num").text(count) })
React
import {useState} from "react" function App(){ const [count,setCount]=useState(0) return( <> <p>{count}</p> <button onClick={()=>setCount(count+1)}>+</button> </> ) }
Vue
const app=Vue.createApp({ data(){ return{count:0} } }) <p>{{count}}</p> <button @click="count++">+</button>
Angular
<p>{{count}}</p> <button (click)="count=count+1">+</button>
Svelte
<script> let count=0 </script> <p>{count}</p> <button on:click={()=>count++}>+</button>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('simple-counter', () => { const state = reactive({ count: 0 }); return { inc: () => { state.count++; }, render: () => `

` }; });

Why SimpliJS wins For a simple counter, frameworks introduce state systems and component rendering. SimpliJS keeps the logic minimal: increment a variable and update the text in the DOM. The code is shorter and more transparent, which is ideal for small interactive features.

SET 6 — Render List from Array

Vanilla
let arr=["Apple","Banana","Orange"] let ul=document.getElementById("list") arr.forEach(v=>{ let li=document.createElement("li") li.innerText=v ul.appendChild(li) })
jQuery
let arr=["Apple","Banana","Orange"] arr.forEach(v=>{ $("#list").append("<li>"+v+"</li>") })
React
const arr=["Apple","Banana","Orange"] function App(){ return( <ul> {arr.map(v=><li>{v}</li>)} </ul> ) }
Vue
<li v-for="v in arr">{{v}}</li>
Angular
<li *ngFor="let v of arr">{{v}}</li>
Svelte
{#each arr as v} <li>{v}</li> {/each}
SimpliJS (official)
import { component } from 'simplijs'; component('fruit-list', () => { const fruits = ["Apple","Banana","Orange"]; return { render: () => `
` }; });

Why SimpliJS wins SimpliJS allows developers to iterate over an array and append elements directly to the DOM. The logic is familiar to anyone who knows JavaScript loops. Frameworks require templating or component rendering mechanisms, which adds complexity for a very basic task.

SET 7 — Filter List

Vanilla
document.getElementById("search").oninput=function(){ let q=this.value.toLowerCase() document.querySelectorAll(".item").forEach(el=>{ el.style.display= el.innerText.toLowerCase().includes(q) ?"block":"none" }) }
jQuery
$("#search").on("input",function(){ let q=this.value.toLowerCase() $(".item").each(function(){ $(this).toggle($(this).text().toLowerCase().includes(q)) }) })
React
const [q,setQ]=useState("") const filtered=list.filter(v=>v.includes(q))
Vue
<input v-model="q"> <li v-for="v in filtered">{{v}}</li>
Angular
<input [(ngModel)]="q">
Svelte
$: filtered=list.filter(v=>v.includes(q))
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('filter-demo', () => { const state = reactive({ q: '', list: ["Apple","Banana","Orange"] }); return { render: () => `
` }; });

Why SimpliJS wins Filtering a list becomes a straightforward process: read the input value and update the display of each item. SimpliJS lets developers directly manipulate elements without setting up reactive data structures or computed properties. This keeps the code simple and predictable.

SET 8 — Sort Table

Vanilla
let rows=[...document.querySelectorAll("tr.data")] rows.sort((a,b)=>a.innerText.localeCompare(b.innerText))
jQuery
let rows=$("tr.data").get() rows.sort((a,b)=>$(a).text().localeCompare($(b).text()))
React
const sorted=[...data].sort()
Vue
computed:{ sorted(){ return [...this.data].sort() } }
Angular
this.data.sort()
Svelte
$: sorted=[...data].sort()
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('sort-table', () => { const state = reactive({ items: ['Banana', 'Apple', 'Orange'] }); return { sort: () => state.items.sort(), render: () => `
` }; });

Why SimpliJS wins Sorting is essentially a JavaScript array operation followed by updating the DOM. SimpliJS allows this logic to stay simple and procedural. Frameworks often involve state updates and re-rendering, which adds unnecessary structure for a simple sorting operation.

SET 9 — Fetch API

Vanilla
fetch("/api") .then(r=>r.json()) .then(d=>{ document.getElementById("out").innerText=JSON.stringify(d) })
jQuery
$.get("/api",function(d){ $("#out").text(JSON.stringify(d)) })
React
useEffect(()=>{ fetch("/api") .then(r=>r.json()) .then(setData) },[])
Vue
mounted(){ fetch("/api").then(r=>r.json()).then(d=>this.data=d) }
Angular
this.http.get("/api").subscribe(d=>this.data=d)
Svelte
onMount(async()=>{ data=await fetch("/api").then(r=>r.json()) })
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('fetch-example', () => { const state = reactive({ data: null }); return { onMount: async () => { state.data = await fetch("/api").then(r => r.json()); }, render: () => `
Loading...

    `
  };
});

Why SimpliJS wins SimpliJS works naturally with native browser APIs like Fetch. Developers can use standard JavaScript without framework-specific patterns. The data can be retrieved and immediately displayed without involving component lifecycle methods or state systems.

SET 10 — Load JSON and Display List

Vanilla JS
fetch("data.json") .then(r=>r.json()) .then(data=>{ let ul=document.getElementById("list") data.forEach(v=>{ let li=document.createElement("li") li.innerText=v.name ul.appendChild(li) }) })
jQuery
$.getJSON("data.json",function(data){ data.forEach(v=>{ $("#list").append("<li>"+v.name+"</li>") }) })
React
import {useEffect,useState} from "react" function App(){ const [data,setData]=useState([]) useEffect(()=>{ fetch("data.json") .then(r=>r.json()) .then(setData) },[]) return( <ul> {data.map(v=><li key={v.id}>{v.name}</li>)} </ul> ) }
Vue
const app=Vue.createApp({ data(){ return{list:[]} }, mounted(){ fetch("data.json") .then(r=>r.json()) .then(d=>this.list=d) } }) <li v-for="v in list">{{v.name}}</li>
Angular
ngOnInit(){ fetch("data.json") .then(r=>r.json()) .then(d=>this.list=d) } <li *ngFor="let v of list">{{v.name}}</li>
Svelte
<script> let list=[] fetch("data.json") .then(r=>r.json()) .then(d=>list=d) </script> <ul> {#each list as v} <li>{v.name}</li> {/each} </ul>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('json-list', () => { const state = reactive({ items: [] }); return { onMount: async () => { state.items = await fetch("data.json").then(r => r.json()); }, render: () => `
` }; });

Why SimpliJS wins SimpliJS allows developers to fetch data and directly generate DOM elements from the result. The flow is easy to follow: fetch data, iterate through it, and append elements. This direct workflow avoids the component rendering layers used in many frameworks.

SET 11 — Modal Popup

Vanilla
btn.onclick=()=>modal.style.display="block" close.onclick=()=>modal.style.display="none"
jQuery
$("#open").click(()=>$("#modal").show()) $("#close").click(()=>$("#modal").hide())
React
{show && <Modal/>}
Vue
<div v-if="show">Modal</div>
Angular
<div *ngIf="show">Modal</div>
Svelte
{#if show} <div>Modal</div> {/if}
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('modal-demo', () => { const state = reactive({ show: false }); return { toggle: () => { state.show = !state.show; }, render: () => ` ` }; });

Why SimpliJS wins Opening and closing a modal is a simple UI behavior. SimpliJS allows developers to directly show or hide the modal element. Frameworks typically require state variables and conditional rendering. SimpliJS removes that overhead and keeps the interaction simple.

SET 12 — Tabs Component

Vanilla JS
document.querySelectorAll(".tab").forEach(btn=>{ btn.onclick=function(){ document.querySelectorAll(".content").forEach(c=>c.style.display="none") document.getElementById(this.dataset.target).style.display="block" } })
jQuery
$(".tab").click(function(){ $(".content").hide() $("#"+$(this).data("target")).show() })
React
const [tab,setTab]=useState("t1") <button onClick={()=>setTab("t1")}>Tab1</button> <button onClick={()=>setTab("t2")}>Tab2</button> {tab==="t1" && <div>Content1</div>} {tab==="t2" && <div>Content2</div>}
Vue
<button @click="tab='t1'">Tab1</button> <button @click="tab='t2'">Tab2</button> <div v-if="tab=='t1'">Content1</div> <div v-if="tab=='t2'">Content2</div>
Angular
<button (click)="tab='t1'">Tab1</button> <button (click)="tab='t2'">Tab2</button> <div *ngIf="tab=='t1'">Content1</div> <div *ngIf="tab=='t2'">Content2</div>
Svelte
<script> let tab="t1" </script> <button on:click={()=>tab="t1"}>Tab1</button> <button on:click={()=>tab="t2"}>Tab2</button> {#if tab==="t1"}<div>Content1</div>{/if} {#if tab==="t2"}<div>Content2</div>{/if}
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('tabs-demo', () => { const state = reactive({ activeTab: 't1' }); return { render: () => `
Content1
Content2
` }; });

Why SimpliJS wins Tabs are essentially a UI visibility problem: show one section and hide the others. SimpliJS expresses this logic clearly with simple element selection and show/hide operations. Framework implementations often require component state management, which is unnecessary for such a simple interaction.

SET 13 — Accordion

Vanilla
document.querySelectorAll(".title").forEach(t=>{ t.onclick=function(){ this.nextElementSibling.classList.toggle("show") } })
jQuery
$(".title").click(function(){ $(this).next().toggle() })
React
const [open,setOpen]=useState(false) <h3 onClick={()=>setOpen(!open)}>Title</h3> {open && <p>Content</p>}
Vue
<h3 @click="open=!open">Title</h3> <p v-if="open">Content</p>
Angular
<h3 (click)="open=!open">Title</h3> <p *ngIf="open">Content</p>
Svelte
<script> let open=false </script> <h3 on:click={()=>open=!open}>Title</h3> {#if open} <p>Content</p> {/if}
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('accordion-item', () => { const state = reactive({ open: false }); return { render: () => `

Title

Content

` }; });

Why SimpliJS wins The accordion behavior only requires toggling the visibility of content when a title is clicked. SimpliJS performs this action with a direct event handler and a simple toggle operation. The code remains short and easy to understand.

SET 14 — Dropdown Menu

Vanilla
btn.onclick=function(){ menu.classList.toggle("show") }
jQuery
$("#btn").click(()=>{ $("#menu").toggle() })
React
const [open,setOpen]=useState(false) <button onClick={()=>setOpen(!open)}>Menu</button> {open && <ul><li>A</li></ul>}
Vue
<button @click="open=!open">Menu</button> <ul v-if="open"></ul>
Angular
<button (click)="open=!open">Menu</button> <ul *ngIf="open"></ul>
Svelte
<button on:click={()=>open=!open}>Menu</button> {#if open} <ul></ul> {/if}
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('dropdown-menu', () => { const state = reactive({ open: false }); return { render: () => `
  • A
` }; });

Why SimpliJS wins SimpliJS lets developers toggle the dropdown visibility with a single interaction handler. Component frameworks require state variables to control whether the dropdown is visible. SimpliJS avoids that abstraction and focuses directly on the DOM action.

SET 15 — Form Validation

Vanilla
form.onsubmit=function(e){ if(email.value==""){ alert("Email required") e.preventDefault() } }
jQuery
$("#form").submit(function(e){ if($("#email").val()==""){ alert("Email required") e.preventDefault() } })
React
function submit(e){ if(email===""){ e.preventDefault() } }
Vue
methods:{ submit(e){ if(this.email=="") e.preventDefault() } }
Angular
submit(){ if(this.email=="") return }
Svelte
function submit(e){ if(email=="") e.preventDefault() }
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('validate-form', () => { const state = reactive({ email: '' }); const submit = (e) => { if (state.email === '') alert('Email required'); }; return { render: () => `
` }; });

Why SimpliJS wins Form validation can be handled with a straightforward event listener and a few checks. SimpliJS lets developers access form values directly and prevent submission when necessary. The process remains close to standard JavaScript behavior without requiring framework-specific form systems.

SET 16 — Password Show/Hide

Vanilla
toggle.onclick=function(){ pass.type=pass.type=="password"?"text":"password" }
jQuery
$("#toggle").click(function(){ let p=$("#pass") p.attr("type", p.attr("type")=="password"?"text":"password") })
React
const [show,setShow]=useState(false) <input type={show?"text":"password"} />
Vue
<input :type="show?'text':'password'">
Angular
<input [type]="show?'text':'password'">
Svelte
<input type={show?"text":"password"}>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('password-toggle', () => { const state = reactive({ show: false }); return { render: () => `
` }; });

Why SimpliJS wins This feature only requires toggling an input field’s type attribute. SimpliJS allows this to be done with a small amount of code and no additional state variables. The logic remains direct and easy to follow.

SET 17 — Character Counter

Vanilla
text.oninput=function(){ count.innerText=this.value.length }
jQuery
$("#text").on("input",function(){ $("#count").text(this.value.length) })
React
const [t,setT]=useState("") <p>{t.length}</p>
Vue
<input v-model="t"> <p>{{t.length}}</p>
Angular
<input [(ngModel)]="t"> <p>{{t.length}}</p>
Svelte
<input bind:value={t}> <p>{t.length}</p>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('char-counter', () => { const state = reactive({ text: '' }); return { render: () => `

` }; });

Why SimpliJS wins SimpliJS handles this interaction with a simple input event listener. The current character count is calculated and displayed immediately. Frameworks typically rely on reactive data binding, which adds complexity for such a basic feature.

SET 18 — AJAX Form Submit

Vanilla
form.onsubmit=function(e){ e.preventDefault() fetch("/submit",{ method:"POST", body:new FormData(form) }) }
jQuery
$("#form").submit(function(e){ e.preventDefault() $.post("/submit",$(this).serialize()) })
React
function submit(e){ e.preventDefault() fetch("/submit",{method:"POST"}) }
Vue
methods:{ submit(e){ e.preventDefault() } }
Angular
submit(){ this.http.post("/submit",data) }
Svelte
function submit(e){ e.preventDefault() }
SimpliJS (official)
import { component } from 'simplijs'; component('ajax-form', () => { const submit = (e) => { fetch("/submit", { method: "POST", body: new FormData(e.target) }); }; return { render: () => `
` }; });

Why SimpliJS wins SimpliJS works seamlessly with the native Fetch API. The developer can intercept the form submission, send the request, and process the response without needing a framework-specific networking solution. This keeps the code simple and flexible.

SET 19 — Simple Router (Hash Router)

Vanilla
window.onhashchange=function(){ let page=location.hash.replace("#","") document.querySelectorAll(".page") .forEach(p=>p.style.display="none") document.getElementById(page) .style.display="block" }
jQuery
$(window).on("hashchange",function(){ let page=location.hash.replace("#","") $(".page").hide() $("#"+page).show() })
React
Usually done with React Router. <Route path="/home" element={<Home/>}/>
Vue
Usually done with Vue Router { path:"/home", component:Home }
Angular
Angular Router { path:'home', component:HomeComponent }
Svelte
Usually svelte-spa-router import Router from "svelte-spa-router"
SimpliJS (official)
import { createRouter } from 'simplijs'; const router = createRouter({ '#/home': () => '
Home page
', '#/about': () => '
About page
' }); // Automated SPA routing with Transitions

Why SimpliJS wins SimpliJS can implement a simple client-side router using the browser’s hash change event. This avoids installing and configuring external routing libraries, which are often required in major frameworks. For small projects, this approach is faster and easier to manage.

SET 20 — Theme Toggle (Dark Mode)

Vanilla
btn.onclick=function(){ document.body.classList.toggle("dark") }
jQuery
$("#btn").click(function(){ $("body").toggleClass("dark") })
React
const [dark,setDark]=useState(false) <div className={dark?"dark":""}> <button onClick={()=>setDark(!dark)}>Toggle</button> </div>
Vue
<div :class="{dark:dark}"> <button @click="dark=!dark"></button> </div>
Angular
<div [class.dark]="dark"> <button (click)="dark=!dark"></button> </div>
Svelte
<button on:click={()=>dark=!dark}></button> <div class:dark={dark}></div>
SimpliJS (official)
import { component, reactive } from 'simplijs'; component('theme-toggle', () => { const state = reactive({ dark: false }); return { render: () => `
` }; });

Why SimpliJS wins Switching themes only requires toggling a CSS class on the document body. SimpliJS allows this to be done with a single event handler. Frameworks usually introduce state variables and reactive rendering for the same behavior, which adds unnecessary complexity.

SET 21 — Cross-Framework Component Bridge

React/Vue/Svelte
Impossible without heavy wrappers like 'module federation' or 'micro-frontends'. Requires complex build tools and runtime config.
SimpliJS (official)
import { use, component } from 'simplijs'; // Implemented in v3.2.0 - Cross-framework mounting const ReactBtn = use.react('./Button.jsx'); component('my-app', () => ({ render: () => `<${ReactBtn} color="blue">Bridge!</${ReactBtn}>` }));

Universal Compatibility SimpliJS's The Bridge (planned for v1.0) will allow you to import components from React, Vue, or Svelte directly into your SimpliJS apps. It's designed to be the ultimate connector for the web ecosystem.

SET 22 — State Time Travel & Hot-Sharing

Redux / Pinia
Requires Redux DevTools extension, complex boilerplate, and manual URL state synchronization.
SimpliJS (official)
// Implemented in v3.2.0 - Advanced state management const s = reactive.vault({ count: 0 }); s.vault.back(); s.vault.share(); // Instant debug link

Developer Experience SimpliJS is planning to build Time Travel Debugging directly into the core reactivity engine in version 1.0, enabling instant state sharing and snapshot-based debugging.

Final Technical Analysis: Why SimpliJS?

The Compilers vs The Connector

Frameworks like React and Svelte rely on heavy compilation or complex Virtual DOM diffing. SimpliJS uses a native Proxy-based reactivity engine. This means no build step is required for production, yet it maintains performance that rivals the leaders.

The "Python of JS" Philosophy

SimpliJS aims to provide "batteries included" power with "script tag" simplicity. With 8 native features and 7 enterprise plugins, it covers essential use cases without the dependency headache.