// const justact = require('justact'); import * as justact from 'justact'; import { ForEach } from 'justact'; class InputMultiplex extends justact.Component { render () { return this.swap ? ( ) : ( ) } } class App extends justact.Component { render () { return (
( )} />
) } } // TODO: This should be a single function call; // maybe like: justact.append(document.body, new App()) document.addEventListener('DOMContentLoaded', () => { const root = new App({}); const elements = root.createElements(); console.log('app', root); for ( const element of elements ) { document.body.append(element); } root.notifyMounted({ parent: document.body }); });