I'm exploring the most effective approach to creating a modal component that incorporates hide and show methods accessible from both the parent and the component itself.
One option is to store the status on the child. Utilize ref on the child component, allowing the parent to call a method on the child for updating the status and showing/hiding the component.
Alternatively, you can store the status on the parent and pass it down to the child as a prop. Use emit to signal the change in status back to the parent when the child needs to hide itself.
Which of these methods would be the most suitable for this scenario?