- Node.js 24+
- npm 10+
cd core
npm installSpecifyJS uses createElement (or JSX) to describe UI:
import { createElement } from 'specifyjs';
import { useState } from 'specifyjs/hooks';
import { createRoot } from 'specifyjs/dom';
function App() {
const [count, setCount] = useState(0);
return createElement('div', null,
createElement('h1', null, `Count: ${count}`),
createElement('button', {
onClick: () => setCount(count + 1)
}, 'Increment'),
);
}
const root = createRoot(document.getElementById('root'));
root.render(createElement(App, null));Start the Vite dev server for hot-reloading:
npx vite --port 3000npm run buildOutput lands in dist/ with ESM and CJS bundles.
npm test # Unit + integration (465 tests)
npm run test:e2e # Playwright browser tests (27 tests)
npm run test:coverage # Tests with coverage report- Core Concepts — Components, props, state
- Hooks API — All 16 hooks
- Building SPAs — SPA patterns and examples