Comment on page
🧱
Creating a Component
To create a component call
$app.createComponent()
passing the name of the component and the data used to initialise the reactive store.Name | Type | Description |
---|---|---|
Name | string (snake_case) | The name of the component |
Initial Data | object | Data used to initialise the reactive data store |
<script>
const myComponentStore = {
fields: {
first_name: 'Jane',
last_name: 'Doe',
},
displaySuccess: false,
displayError: false,
};
$app.createComponent('my_component', myComponentStore).mount('#myComponent');
</script>
Last modified 8mo ago