code: function setRoutesInState(routes) {
      const routesByName = {};
      routes.forEach(route => {
          routesByName[route.name] = route.route;
      });
      return routesByName;
  }
docs: INITIALISATION FUNCTIONS