react router setup in react js code example Example: install react router $ npm install --save react-router