Skip to content

Chime plugin for bidirectional data-binding between elements and Variable objects.

License

Notifications You must be signed in to change notification settings

oelin/chime-binding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chime-binding

Chime plugin for bidirectional data-binding between elements and Variable objects. Still in beta.

Installation

npm i chime-binding

Usage

Reactive form example.

import { Element, use } from 'chime'
import binding, { Variable } from 'chime-binding'

use('attribute', binding) // Overload the default attribute plugin.


function App() {
    const username = new Variable('Alice')
    
    return Element('div')
        .Element('input')
            .attribute('value', username) // Bind value to username.
            .end()
        .Element('h1')
            .attribute('innerText', username) // Bind innerText to username.
            .top()
}

About

Chime plugin for bidirectional data-binding between elements and Variable objects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published