Const
Centered container
As setup
using container = app.scene(Container, { defaultProps: { content: '' },});await container.show({ content: 'This is centered' }); Copy
using container = app.scene(Container, { defaultProps: { content: '' },});await container.show({ content: 'This is centered' });
As component
using adder = app.scene( adapter((props: { a: number; b: number }, ctx) => Container({ content: () => props.a + props.b }, ctx), ), { defaultProps: { a: 0, b: 0 } },);await adder.show({ a: 1, b: 2 }); // shows 3 Copy
using adder = app.scene( adapter((props: { a: number; b: number }, ctx) => Container({ content: () => props.a + props.b }, ctx), ), { defaultProps: { a: 0, b: 0 } },);await adder.show({ a: 1, b: 2 }); // shows 3
Centered container