Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Lightweight JSX-based UI framework with boilerplate-free state managament.

License

NotificationsYou must be signed in to change notification settings

oamaok/kaiku

Repository files navigation

CI

From Finnishkaiku/ˈkɑi̯ku/, meaningecho.

A lightweight JSX-based UI framework with a freely mutable, boilerplate-free global state management.

Try it out!

Getting started

Kaiku is packaged to be easily used in both browser and as a module, no build tools required:

<scripttype="module">import{h,render,createState}from'https://unpkg.com/kaiku'conststate=createState({greeting:'Hello world'})constApp=()=>h('span',null,state.greeting)render(h(App),document.body)</script>

Or, just install the package using your favorite package manager:

# With NPMnpm i -s kaiku# With yarnyarn add kaiku

Example

A simple ticker component with global state management.

import{render,createState}from'kaiku'conststate=createState({ticks:0})constTicker=()=>(<div><div>      There have been<b>{state.ticks} ticks</b> since last update.</div><buttononClick={()=>{state.ticks=0}}>Reset</button></div>)setInterval(()=>state.ticks++,1000)render(<Ticker/>,document.body)

Documentation

See theofficial website.

License

Copyright (c) 2021 Teemu PääkkönenThis source code is licensed under the MIT license found in theLICENSE file in the root directory of this source tree.

About

Lightweight JSX-based UI framework with boilerplate-free state managament.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp