kurge
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Kurge · npm version travis-ci coveralls github license

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.

Installation

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

Documentation

You can find getting started and documentation on the website or the wiki.

Example

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.

Note

Kurge depends Proxy and Reflect of ES6 to observe the state and context. So you need polyfills to run Kurge in those unsupported browsers.

License

Kurge is MIT licensed.

Dependents (0)

Package Sidebar

Install

npm i kurge

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

70.8 kB

Total Files

29

Last publish

Collaborators

  • siubaak