Microstructural characteristics and hydrogen storage properties of the Mg–Ni–TiS2 nanocomposite prepared by a solution-based method