  We investigated the structural evolution of electrochemically fabricated Pd
nanowires $\textit{in situ}$ by means of grazing-incidence transmission small-
and wide-angle x-ray scattering (GTSAXS and GTWAXS), x-ray fluorescence (XRF)
and 2-dimensional surface optical reflectance (2D-SOR). This shows how
electrodeposition and the hydrogen evolution reaction (HER) compete and
interact during Pd electrodepositon. During the bottom-up growth of the
nanowires, we show that $\beta$-phase Pd hydride is formed. Suspending the
electrodeposition then leads to a phase transition from $\beta$- to
$\alpha$-phase Pd hydride. Additionally, we find that grain coalescence later
hinders the incorporation of hydrogen in the Pd unit cell. GTSAXS and 2D-SOR
provide complementary information on the volume fraction of the pores occupied
by Pd, while XRF was used to monitor the amount of Pd electrodeposited.
