Better way to inject data between props & axios

What is the better way to inject data in vue files between :

Inject data via props in twig for example or with axios requests when DOM is mounted ?

Both comes from a controller obviously.

{% set data = [] %}

    {% for d in datafromcontroller %}
        {% set data = data|merge([{ name: d.name}]) %}
    {% endfor %}

<component prop="{{ data }}"></component>

or

 mounted() {
    axios
      .get("getData")
      .then((response) => {
        this.data= response.data;
      });
  }