<!--modelUpdate-->

<!--PARENT-->
<template>
  <div>
    <h1>A2 - parent</h1>
    <!-- toto je rozepsany model, lze pouzit a je to lepsi 
    <input v-model="inputValue" class="border border-gray-400" />
    -->
    <input
      :value="inputValue"
      @input="inputValue = $event.target.value"
      class="border border-gray-400"
    />
    <b2 v-model:propstochild="inputValue" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      inputValue: ''
    }
  },
  methods: {},
  computed: {},
  mounted() {}
}
</script>


<!--CHILD-->
<template>
  <div>
    <h1>B2 - child</h1>
    <input
      :value="propstochild"
      @input="$emit('update:propstochild', $event.target.value)"
      class="border border-gray-400"
    />
  </div>
</template>

<script>
export default {
  emits: ['update:propstochild'],
  props: ['propstochild'],
  data() {
    return {}
  },
  methods: {},
  computed: {},
  mounted() {}
}
</script>