I want to build a page where students can write objective exams.
The page has to display only one question at a time, then the student can use the next and previous button to move forward and backward through the questions.
I don't want to hit the database each time the next button is click to fetch the next question.
I already have all these questions stored in a questions object.
I really can't figure out how to approach this solution. Any Ideas please
Sounds like you would use something like a Vue component. You'd pass all the questions to it and render the current question. You would have some state to determine what the current question is and use the next and previous buttons to change that state. Seems pretty straight forward.
You could expand it by having the component save progress through the questions. You might also want to use query parameters so a person could navigate directly to a particular question.