...

/

Specifying a type for an object prop

Specifying a type for an object prop

React component props aren't always based on primitive types. How can we specify types for props that are objects? We'll find out in this lesson.

Specifying an object prop #

The props we have implemented so far have been primitive types. What about a prop that has a complex object as its type? Well, a prop type can be an interface or type alias to define a complex type.

In the CodeSandbox project, we were working on in the last ...