Let Q be a vertex subset problem on graphs. In a reconfiguration variant of Q we are given a graph G and two feasible solutionsThe problem is to determine whether there exists a sequence S 1 , . . . , S n of feasible solutions, where S 1 = S s , S n = S t , |S i | k ± 1, and each S i+1 results from S i , 1 i < n, by the addition or removal of a single vertex. We prove that for every nowhere dense class of graphs and for every integer r 1 there exists a polynomial p r such that the reconfiguration variants of the distance-r independent set problem and the distance-r dominating set problem admit kernels of size p r (k). If k is equal to the size of a minimum distance-r dominating set, then for any fixed ε > 0 we even obtain a kernel of almost linear size O(k 1+ε ). We then prove that if a class C is somewhere dense and closed under taking subgraphs, then for some value of r 1 the reconfiguration variants of the above problems on C are W[1]-hard (and in particular we cannot expect the existence of kernelization algorithms). Hence our results show that the limit of tractability for the reconfiguration variants of the distance-r independent set problem and distance-r dominating set problem on subgraph closed graph classes lies exactly on the boundary between nowhere denseness and somewhere denseness.