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

1.0.0-alpha.3 • Public • Published

Knue - Knockout, powered by Vue

(WARNING: Not production ready, still in alpha. Open issues if you have a particular Knockout API you need.)

Drop-in replacement for much of the Knockout API, but backed with Vue. Useful for migrating from a Knockout codebase when refactoring to Vue.

ko

Root object

import Knue from 'knue'

const ko = new Knue()

API

✅ Observables (v1.0.0-alpha.1)

Observable

const ko = new Knue()

const foo = ko.observable(1)

Or, methods can be destructured, like:

const { observable } = new Knue()

const foo = observable(1)

ObservableArray

const foo = ko.observableArray<string>()
console.log(foo()) // []

Computed

const co1 = ko.computed(() => 1)
const co2 = computed(() => co1() + 1)
console.log(co1()) // 1
console.log(co2()) // 2

Readme

Keywords

none

Package Sidebar

Install

npm i knue

Weekly Downloads

1

Version

1.0.0-alpha.3

License

MIT

Unpacked Size

8.11 kB

Total Files

7

Last publish

Collaborators

  • matthew-dean