The photocorrosion of CdS is prevented in the 0D/2D CdS/MoS2 nanosheet system.
A photocorrosion-recrystallization strategy is proposed to resolve photocorrosion.
The as-obtained nanocomposite shows stable and efficient photocatalytic activity.
The recrystallization is verified by the mixtures of CdS with MoS2 or WS2 nanosheets.