Pinterest Board Navigation: Build a Breadcrumbs Component
On Pinterest, users often navigate through deeply nested content, from broad categories to specific boards, and then to individual Pins. A clear and intuitive navigation trail is crucial for users to understand their current location within the platform and easily backtrack. In this problem, you will build a reusable Breadcrumbs component that displays the user's current path, allowing them to navigate back up the hierarchy.
Your task is to implement a Breadcrumbs React component that accepts a list of BreadcrumbItem objects and renders them as a navigation path.
BreadcrumbItem type: Create a TypeScript interface for BreadcrumbItem with properties label: string and an optional path: string.Breadcrumbs Component:
items: BreadcrumbItem[] prop.>).path to the console).>).nav for the overall component, a for links).Breadcrumbs component renders correctly with provided mock data.items prop are displayed in the correct order.>) is displayed between each breadcrumb item.path to the console.Constraints
BreadcrumbItem objects.path will always be a valid string when present for a clickable item.onClick handlers are sufficient for simulating navigation.Loading editor...