Shantanu Singh The problem is that Details.js does not even render? Have you tried React Router? Full Stack Open has a good explanation how to use it. React Router renders a component based on the current location, in your case Details/userId . You also have to pass the userId to the component or save it in a state, so that you can access it, when Details.js is rendered.