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