/*
Replaces the current state's params in the history with new params.
The state is NOT exited/re-entered.
function replaceParams(newParams) {
    if (!currentState) return

    const newUri = router.link(currentState.state.fullName, newParams)

    currentState = StateWithParams(currentState.state, newParams, newUri)

    history.replaceState(newUri, document.title, newUri)
  }