Bigbasket Order Fulfillment Progress Tracker
At Bigbasket, ensuring a transparent and engaging user experience is crucial. When customers place an order, they expect to know its current status and what's next. A well-designed progress bar helps manage expectations and reduces anxiety, improving overall satisfaction. This problem challenges you to build a robust and user-friendly progress bar component that can track the different stages of an order fulfillment process.
Your primary task is to create a reusable React component called ProgressBar that visually represents the sequential stages of a process. For this problem, consider the process of a Bigbasket order fulfillment.
ProgressBar component: This component should accept an array of step names (e.g., ['Order Placed', 'Processing', 'Out for Delivery', 'Delivered']) and the currentStepIndex as props.currentStepIndex.App component that, when clicked, advances the currentStepIndex to the next stage.currentStepIndex reaches the last step), the "Next Step" button should be disabled, and the UI should clearly indicate completion.ProgressBar component correctly renders all provided steps.currentStepIndex in the App component's state.ProgressBar component updates its display correctly when currentStepIndex changes.Constraints
currentStepIndex only increases).steps data or currentStepIndex values.ProgressBar component.useState) to manage component state and interactions.Loading editor...