By definition, $f^{\prime}(z_0) = lim_{z \to z_0} \frac{f(z)-f(z_0)}{z-z_0} $$f^{\prime}(z_0) = \mathrm{lim}_{z \to z_0} \frac{f(z)-f(z_0)}{z-z_0} $
If the function is differentiable, then the limit exists. If the limit exists, then it is independent of how $z \to z_0$. In particular, we could fix $y_0$ and approach along $x$.