How does react render different components based on interface data?

I"ve made a bunch of components that correspond to a machine type
interface data

.
res = [
{type:"Car"},
{type:"Tank"}
]

switch? ui
res.map(x=><${x.type}/>)
Apr.18,2022

you can do a mapping manually

  

see if there is a big difference in the UI of your pile of components. If the difference is not big, you can pass the machine type as props. If the difference is too big, you can only judge one by one.

Menu