🏝️ Koh.js - Event Island!

This example demonstrates the use of:


import { island } from './static/koh-js/core/index.js'
import { fromEvent } from './static/koh-js/stream/index.js'
import { debounce, map } from './static/koh-js/operators/index.js'

island('event-island', k => {
    // create a stream from input events, debounce 500ms
    const search$ = fromEvent(k.qs('[name="query"]'), 'input').pipe(
        debounce(500),
        // map event to value
        map(e => e.target.value)
    )

    // automatically update the span text
    k.sync('span', search$)
})                  
                
                

<event-island />

Debounced value: ...