- Notifications
You must be signed in to change notification settings - Fork2
Lightweight JSX-based UI framework with boilerplate-free state managament.
License
NotificationsYou must be signed in to change notification settings
oamaok/kaiku
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
From Finnishkaiku/ˈkɑi̯ku/, meaningecho.
A lightweight JSX-based UI framework with a freely mutable, boilerplate-free global state management.
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
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)
See theofficial website.
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
Packages0
No packages published