react routernpm code example Example 1: install react router npm install react-router-dom Example 2: install react router $ npm install --save react-router