UNPKG

jelenjs

Version:

Core runtime library for JelenJS - an experimental UI framework with fine-grained reactivity

77 lines (56 loc) 1.19 kB
# JelenJS JelenJS is an experimental UI framework with fine-grained reactivity, inspired by modern frameworks like SolidJS. ## Features - Fine-grained reactivity - JSX support - Efficient DOM updates - Small footprint ## Installation ```bash npm install jelenjs ``` ## Usage ### Basic Component ```jsx import { signal, effect } from 'jelenjs'; function Counter() { const [count, setCount] = signal(0); return ( <div> <p>Count: {count()}</p> <button onClick={() => setCount(count() + 1)}>Increment</button> </div> ); } ``` ### JSX Configuration To use JSX with JelenJS, configure your tooling as follows: #### For TypeScript projects In your `tsconfig.json`: ```json { "compilerOptions": { "jsx": "preserve", "jsxImportSource": "jelenjs" } } ``` #### For Babel projects In your `.babelrc` or babel configuration: ```json { "presets": [ ["@babel/preset-typescript", { "jsx": "preserve", "jsxPragma": "jsx" }] ], "plugins": [ ["babel-plugin-jsx-dom-expressions", { "moduleName": "jelenjs" }] ] } ``` ## License MIT