Given two props objects:
const p1 = {
id: "p1"
//...
}
const p2 = {
id: "p2"
//...
}
If spreading them both on the same component, like:
<MyComponent {...p1} {...p2}/>
How React is to determine what property value id
to use?
May also consider other cases like
<MyComponent {...p1} id={"p3"} {...p2}/>
<MyComponent id={"p3"} {...p1} {...p2}/>
Basically, whats the rule behind to tell which property value is the value it uses?