Closed philcockfield closed 1 year ago
Design Goal: Network connection UI setup (data and/or video) with only a "single line of code™️" setup.
Components:
Usage:
const self = await Connect.peer(); // ← NB: optional, explicitly secifying the peer. <Connect.Stateful self={self} onChange={(e) => state.change((d) => {/**/})} />
Single line entry:
<Connect.Stateful self={self} onChange={ /* ... */ }} />
Within DevHarness spec:
e.it('ui:header', async (e) => { const dev = Dev.tools<T>(e, initial); const state = await dev.state(); dev.header.border(-0.1).render((e) => { return ( <Connect.Stateful margin={[0, 0, 20, 0]} onChange={(e) => state.change((d) => { d.props.selected = e.selected; d.props.client = e.client; }) } /> ); }); });
<Connect.Stateful onChange={ /* ... */ }} />
sys.net.webrtc.ui.<Connect>
https://github.com/cellplatform/platform-0.2.0/assets/185555/ac66880f-2699-44d4-b7a9-6abb0bd8cf6a
Design Goal: Network connection UI setup (data and/or video) with only a "single line of code™️" setup.
Components:
Usage:
Single line entry:
Within DevHarness spec:
Single line entry: