react app routes code example Example 1: react routes npm install react-router-dom Example 2: routes react npm install --save react-router-dom