npm router code example Example 1: install react router $ npm install --save react-router Example 2: npm browser router npm i browser-router