Looking at building 3 screens and each has navigation between them using next, previous. Finish button to complete. I know that I could use Lighting Flows to navigate but I would not want to use it. I would like to go with creating custom navigation button which takes me to the respective page. I have two approaches as below. Was looking what does community think about which approach is good( if there is any other opinion please do let me know)
Approach 1)
Parent LWC:
<template>
<template if true > // show first page
<c-first-page.....></c-first-page>
</template>
<template if true > // shows second page
<c-second-page.....> </c-second-page> // Displays Questions and questions to be asked page
</template>
<template if true > // show 3rd page
<c-third-page.....></c-third-page>
</template>
<buttons>
Previous,Next,Cancel,Done
// button section will be displayed based on which page we are in
</button>
Approach 2)
Build 3 different LWC:
<c-first-page> , <c-second-page> and <c-third-page>
Each has button based on which order they appear. Example - first page will have next but last page will have finish
Use LWC PageReference Type - https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_page_reference_type to navigate between page. Previous and Next