Question: how to transfer data from one page to another in react?
Answer: A simple one is to have your Main component save those data in its state and pass it to the other pages as props. Since you're using react-router you'll need to clone the this. props. children in your Main component to add the additional props like the data and the function that sets the data.