src/Router.js
function link(stateName, params) {
    const state = leafStates[stateName]
    if (!state) throw new Error('Cannot find state ' + stateName)

    const interpolated = interpolate(state, params)
    const uri = util.normalizePathQuery(interpolated)

    return isHashMode()
      ? '#' + options.hashPrefix + uri
      : uri
  }
function link(stateName, params) {
    const state = leafStates[stateName]
    if (!state) throw new Error('Cannot find state ' + stateName)

    const interpolated = interpolate(state, params)
    const uri = util.normalizePathQuery(interpolated)

    return isHashMode()
      ? '#' + options.hashPrefix + uri
      : uri
  }
/*
Compute a link that can be used in anchors' href attributes
from a state name and a list of params, a.k.a reverse routing.