Skip to content

[Wave 6: VBA Refactor] useSubStep hook: Used by the main screen to manage the navigation between steps #30239

@gedu

Description

@gedu

Part of the project

Coming from Update the VBBA setup flow to new design system design doc.

Implement useSubStep of the design doc to:

This hook will be used for the main component step to keep track of the current sub-steps.

Feature Description

At initialization, you pass the list of sub-steps to show, where to start and a callback to know when reaches the last step.

Will return an array with the next item:

  • function nextStep, which should check if can move forward or if it was in edit mode go to the last screen (in general will be the confirmation step)
  • function moveAndEdit, which will take you to a specific step in edit mode
  • the component to render
  • the isEditMode to enable the edition on that step

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions