I am developing a website in React.
In this website I have a screen - lets call it "book-an-appointment"
And I have multiple flows:
- book an appointment for existing client
- book an appointment for non-existing client
book-an-appointment is part of flow 1 and 2, with slight differences:
- some buttons that are shown only in one of them
- "next" button that takes the user to a different screen
- it affects differently on the funnels
- of course each one of them is in a different URL
- and more...
Question: Which approach is best practice in developing such screen in react? options I thought about are:
- Creating A single screen that shows the relevant buttons and actions according to the state
- Duplicating the screen for each flow (because of the small differences in it)
I am quite new to react. tried to look for an answer here and in google but couldnt find my answer.