using react router to route pages code example Example: react-router react-router-dom npm install react-router-dom