0.1.1 • Published 10 months ago
cordis-plugin-reactive v0.1.1
Reactive for Cordis
用法 Usage
import {Context} from 'cordis'
import {} from 'cordis-plugin-reactive'
export function apply(ctx:Context){
const reactiveValue = ctx.reactive({reactiveProp:1});
const refValue = ctx.ref('Hello,world');
ctx.watch(reactiveValue,(val)=>{
})
ctx.watch(refValue.value,(val)=>{
})
const computedValue = ctx.computed(()=>refValue.value + '!')
ctx.watch
}