Default scene options
Readonly
rootRoot element
Readonly
propsReactive props
Optional
dataData getter
Function
showShow the scene and change props temporarily
Current scene options
Readonly
appThe App instance
Readonly
defaultDefault scene options
Protected
listenersUse component
using scene = app.scene(
(props: { text: string }, ctx) => {
const stim = ctx.use(TextStim); // use other component
effect(() => {
stim.props.children = 'Current text is: ' + props.text;
});
return {
node: h('div', null, stim.node),
data: () => ({
...stim.data(),
length: props.text.length,
}),
};
},
{ defaultProps: { text: 'default text' } },
);
Override default options temporarily
Emit event listeners
The App instance