双向绑定示例
Vue Lim
Vue Binding Show compile output
vue
<script setup lim>
let value = 'Hello';
</script>
<template>
<input v-model="value"/>
<div> Binding value is {{value}}</div>
</template>
React Lim
React Binding Show compile output
jsx
function App () {
let value = 'Hello';
return <>
<input onInput={e => value = e.target.value} value={value}/>
<div> Binding value is {value}</div>
</>;
}