// Listen in another component NekoBus.on('fish:caught', (data) => nya totalFish += data.weight; ); Neko Script - FE - is 100% interoperable with JS. Use the @js directive to embed vanilla JavaScript:
return ( <div class="cat-card"> <h2>🐱 name</h2> <p>Laps given: lapCount</p> <button meow:click=giveLap> Scratch Ears </button> </div> ); Neko Script - FE -
Compile with neko build . The output is standard HTML, CSS, and JS, deployable to any static host. The "Neko Bus" (Global State Management) For complex apps, Neko Script - FE - provides a built-in event bus called the Neko Bus. It works like a centralized meow relay. // Listen in another component NekoBus
In main.nks :
my-cat-app/ ├── src/ │ ├── main.nks # Entry point │ ├── components/ │ │ └── CatCard.nks │ └── assets/ │ └── yarn.png ├── neko.config.json └── index.html Open src/components/CatCard.nks : The "Neko Bus" (Global State Management) For complex
