export const errorLoading = <V>(url: string, error: Error) =>
  produce((state: CollectionsState<V>) =>
    state.set(url, errorWithReason(error)())
  )