The type A | B refers to objects which are either A or B. In other words, values of such type are drawn from the union of values for A and values for B.
The type A & B refers to objects which are both A and B. In other words, values of such type are drawn from the intersection of values for A and values for B.
The naming and semantics are identical in other languages such as C++.
If you need to know more about React, Its recommended to join React JS Online Course today.