function computeId(baseId, props) {
  if (!props) {
    return `jsx-${baseId}`
  }

  const propsToString = String(props)
  const key = baseId + propsToString

  if (!cache[key]) {
    cache[key] = `jsx-${hashString(`${baseId}-${propsToString}`)}`
  }

  return cache[key]
}
computeId

Compute and memoize a jsx id from a basedId and optionally props.