install react-router-dom using yarn code example Example: installing react router dom with yarn npm install react-router-dom