The derivative, if it exists, of a function \(\displaystyle{f}:\mathbb{R}^{{n}}\rightarrow\mathbb{R}^{{m}}\) at a point x is a linear transformation \(\displaystyle{f}'{\left({x}\right)}:\mathbb{R}^{{n}}\rightarrow\mathbb{R}^{{m}}\) that satisifies

\(\displaystyle{f{{\left({x}+{h}\right)}}}-{f{{\left({x}\right)}}}={f}'{\left({x}\right)}{h}+{r}{\left({h}\right)}\) where \(\displaystyle{r}={o}{\left({\left|{h}\right|}\right)}\)

Now, suppose, \(\displaystyle\phi:\mathbb{R}\rightarrow\mathbb{R}^{{2}}:{t}\mapsto{\left({g{{\left({t}\right)}}},{h}{\left({t}\right)}\right)}\) and \(\displaystyle{f}:\mathbb{R}^{{2}}\rightarrow\mathbb{R}\). If \(\displaystyle\phi\) is differentiable at \(\displaystyle{t}={t}_{{0}}\) and f is differentiable at \(\displaystyle{\left({g{{\left({t}_{{0}}\right)}}},{h}{\left({t}_{{0}}\right)}\right)}\), then we can apply the chain rule to assert that \(\displaystyle{f}\circ\phi:\mathbb{R}\rightarrow\mathbb{R}\) is differentiable at \(\displaystyle{t}={t}_{{0}}\) and

\(\displaystyle{\left({f}\circ\phi\right)}'{\left({t}_{{0}}\right)}:\mathbb{R}\rightarrow\mathbb{R}\) exists and is equal to \(\displaystyle{f}'{\left(\phi\right)}{\left({t}_{{0}}\right)}{)}\circ\phi'{\left({t}_{{0}}\right)}\)

So far, nothing to do with partials.

Of course, it turns out that if the derivative exists then it matches your formula.

And if the relevant partial derivatives are continuous, the derivative exists and the formula is also satisfied.

On the other hand, if one or more of the partials is not continuous at a given point, the derivative may or may not exist there, and you need to check directly to see if (1) is satisfied.