You can use the wire:init directive to dynamically render components in Livewire. The wire:init directive will allow you to pass a component name as a parameter and render it.
In your case, you can use the wire:init directive in the parent-test view like this:
@if($component_name)
<livewire:{{ $component_name }} />
@endif
Then, you can call the setChild method from the parent component and pass the component name as a parameter.
<button wire:click="setChild('Child1')">Set Child 1</button>
<button wire:click="setChild('Child2')">Set Child 2</button>
This should render the corresponding child component based on the parameter passed to the setChild method.