Typescript, React, Web Development, Object Oriented, Compilers.
as there is a restriction as to what can be passed into the data attribute of the props object. Sometimes a variable, function, or object should be allowed to take in more than one type and we can do this by using the union, | operator. In the props definition, we are using this operator to specify