We use cosmological hydrodynamical galaxy formation simulations from the NIHAO project to investigate the response of cold dark matter (CDM) haloes to baryonic processes. Previous work has shown that the halo response is primarily a function of the ratio between galaxy stellar mass and total virial mass, and the density threshold above which gas is eligible to form stars, $n [{rm cm}^{-3}]$. At low $n$ all simulations in the literature agree that dwarf galaxy haloes are cuspy, but at high $nge 100$ there is no consensus. We trace halo contraction in dwarf galaxies with $nge 100$ reported in some previous simulations to insufficient spatial resolution. Provided the adopted star formation threshold is appropriate for the resolution of the simulation, we show that the halo response is remarkably stable for $nge 5$, up to the highest star formation threshold that we test, $n=500$. This free parameter can be calibrated using the observed clustering of young stars. Simulations with low thresholds $nle 1$ predict clustering that is too weak, while simulations with high star formation thresholds $nge 5$, are consistent with the observed clustering. Finally, we test the CDM predictions against the circular velocities of nearby dwarf galaxies. Low thresholds predict velocities that are too high, while simulations with $nsim 10$ provide a good match to the observations. We thus conclude that the CDM model provides a good description of the structure of galaxies on kpc scales provided the effects of baryons are properly captured.