🧱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.

Arguments

Example

<script>
  const myComponentStore = {
    fields: {
      first_name: 'Jane',
      last_name: 'Doe',
    },
    displaySuccess: false,
    displayError: false,
  };
  
  $app.createComponent('my_component', myComponentStore).mount('#myComponent');
</script>

Last updated