I have a Parent component that hosts 2 children. Child A (FileLoader) is a file uploader component. When he successfully uploads something, I want to send an event to Child B (FileViewer) that a file upload succeeded.
I'm new to Vue3 and Vue in general. What is the correct / simple way to send the event info in this way?
In Child A, I already have
this.$emit('new-file-loaded');
but, I'm not sure what to do in my parent. Currently, the parent just holds the 2 components:
<div class="row">
<div class="col">
<FileLoader/>
</div>
</div>
<div class="row">
<div class="col">
<FileViewer />
</div>
</div>
I think in my parent, I want somethign like
<FileTable @new-file-uploaded="....something..."/>
, but I'm not quite sure if that's the right approach.