nya count = 0; nya userName = "Kuro"; When a nya variable changes, the DOM automatically updates—similar to signals in Solid.js but with feline flair. Components are defined using the purr keyword. A purr block returns a virtual DOM tree.
async function loadCatFacts() const response = await claw('https://catfact.ninja/fact'); nya fact = response.data.fact;
According to internal tests on the "Catnip Benchmark" (1000 reactive nodes updating simultaneously): Neko Script - FE -
@js // This runs in vanilla JS context const localStorageKey = 'cat_preferences';
nya preference = localStorage.getItem(localStorageKey) || 'Night mode'; Neko Script simplifies HTTP requests with the claw keyword, which auto-cancels pending requests if a component unmounts (solving a major React pain point). nya count = 0; nya userName = "Kuro";
return ( <div class="cat-card"> <h2>🐱 name</h2> <p>Laps given: lapCount</p> <button meow:click=giveLap> Scratch Ears </button> </div> );
| Framework | Time to Interactive (TTI) | Memory Usage | | :--- | :--- | :--- | | React 18 | 1.2s | 48 MB | | Vue 3 | 1.1s | 42 MB | | | 0.8s | 31 MB | nya fact = response.data.fact
purr CatCard(initialName) nya name = initialName; nya lapCount = 0; function giveLap() lapCount++; console.log( Purring for $lapCount seconds );