Add ForEach to demo

feature/ForEach
KernelDeimos 3 years ago
parent 071a32a8b4
commit 199e2dfa59

@ -1,9 +1,10 @@
// const justact = require('justact');
import * as justact from 'justact';
import { ForEach } from 'justact';
class InputMultiplex extends justact.Component {
render () {
console.log('InputMultiplex', this);
return this.swap ? (
<input value={this.valueB$} type="text" />
) : (
@ -18,6 +19,9 @@ class App extends justact.Component {
<div>
<input type="checkbox" value={this.swap$} />
<InputMultiplex swap={this.swap$}></InputMultiplex>
<ForEach array={[1,2,3]} render={item => (
<input value={item} disabled />
)} />
</div>
)
}

Loading…
Cancel
Save