Hello everyone
im learning react right now i was building a section for a project which is reservation section but i get stuck and need some hint or guidance on how to organize the components and when i click and submit it should take me to another section This is how it should be
and there is several other pages as well
i couldnt find any tutorial or article regarding this
Top comments (2)
You can manage it by useState easily.
I assume , you have section 1, section 2, section 3 .....
When someone submit section 1 going to section 2
In a useState you can store the state number and when someone submitting it can update its state , You can do it by simple if else.
It's most simple way to do it. You can do it also in better way, to make the code more clean.
Thank you very much @tanmoysarkar it was really helpful