Home > OS >  getting inputs data from previous pages in react by using useForm
getting inputs data from previous pages in react by using useForm

Time:08-19

I'm building a Reactjs website that has three pages of inputs the last page should have all the data entered in the previous pages it will be a summary of the data

for the first three pages, I have been using useForm register and handle submit in order to show the data in the console log

now I want to gather all the data on one page and it should be displayed on the last page, not in the console log

how can I achieve this by using useForm?

CodePudding user response:

You should use React context and save all the data in it and at last screen fetch data and display it . You can use redux as well.

  • Related