Dynamic components?

I need to load dynamic components, like Blade Dynamic Components do.
I’m some cases I need to load component A, and in some other component B.
I know it using a foreach and passing data from a parent component.
Also, component A has two properties X and Y, in some cases I have X and in other I have Y, and in some other even both.
How is the best way to do this?
Using Blade new Dynamic components with a Livewire inside and some kind of “$X or null” ?
Or is there a more elegant way?