Kurge is a reactive function component based JavaScript UI binding library.
- Hook-Dominated: All kinds of powerful hooks are available, to keep your states and effects free of all stuffs, making it possible to seperate state with view and logic with component.
- Function-Based: No class components, no object components, and all components are organized by function. Build encapsulated function components to compose your view making UIs.
You can use Kurge as a package installed on npm.
npm i -S kurge
Or, download the minimized version, and link in a <script>
tag.
Also, Kurge-CLI is recommended to initial your Kurge app.
npm i -g kurge-cli
kurge -i my-first-kurge-app
cd my-first-kurge-app
npm start
You can find getting started and documentation on the website or the wiki.
Several examples here. You can get started with this first simple one, and it will render a <p>
tag with text "Hello World!" into a "#app" root container:
function Hello() {
const message = Kurge.useState('World')
return <p>Hello {message.value}!</p>
}
Kurge.render(<Hello/>, document.getElementById('app'))
Kurge are compatible with JSX. Grateful for React making such wonderful HTML-like syntax.
Kurge depends Proxy and Reflect of ES6 to observe the state and context. So you need polyfills to run Kurge in those unsupported browsers.
Kurge is MIT licensed.