updateHistory = (contextId, callback) => {
  const history = getHistory(contextId);
  callback(history);
  setHistory(contextId, history);
}
@param {string} contextId
@param {function(History)} callback