npm instlal react router code example Example: installing react router dom in npm yarn add react-router-dom