import route from react-router or react-router-dom code example Example: react-router react-router-dom npm install react-router-dom