score:1

Accepted answer

you need to wrap all the route in the routes component. you also need to remove the div as route needs direct nesting

import { browserrouter as router, routes, route } from 'react-router-dom';

 <router>
   <routes>
        <route path="/" element ={<homepage />} />
        <route path="/whowehelp" element ={<whowehelp />} />
    </routes>
  </router>

updated component to element as pointed out in the comments. component has been replaced by element in react router v6. see the changes here


Related Query

More Query from same tag