In main.nks:
import mount from 'neko-dom'; import CatCard from './components/CatCard.nks';
const appRoot = document.getElementById('app'); mount(appRoot, <CatCard initialName="Mochi" />);
Compile with neko build. The output is standard HTML, CSS, and JS, deployable to any static host.
To truly leverage Neko Script - FE - , you need to integrate it into your build process. Below are examples for popular frameworks. Neko Script - FE -
Even experienced developers make mistakes with Neko Script. Watch out for these:
Forgetting the meow: prefix: Standard onclick in JSX won't work. Events must be prefixed with meow: to trigger the reactive system. In main
Mismatched Purrs: Components must start with a capital letter after purr, just like in React. purr catButton is invalid; use purr CatButton.
FE scripts use integer variables (%) and string variables ($). Compile with neko build
In main.nks:
import mount from 'neko-dom'; import CatCard from './components/CatCard.nks';
const appRoot = document.getElementById('app'); mount(appRoot, <CatCard initialName="Mochi" />);
Compile with neko build. The output is standard HTML, CSS, and JS, deployable to any static host.
To truly leverage Neko Script - FE - , you need to integrate it into your build process. Below are examples for popular frameworks.
Even experienced developers make mistakes with Neko Script. Watch out for these:
Forgetting the meow: prefix: Standard onclick in JSX won't work. Events must be prefixed with meow: to trigger the reactive system.
Mismatched Purrs: Components must start with a capital letter after purr, just like in React. purr catButton is invalid; use purr CatButton.
FE scripts use integer variables (%) and string variables ($).