methods of forming nanocomposites comprising a polymer and metal nanoparticles are disclosed . the nanoparticles are disposed within a matrix of the polymer . in particular , the nanoparticles are formed in situ in an extruder . the methods comprise providing a reaction mixture comprising a polymer , a metal precursor , and a solvent and extruding the reaction mixture to form a polymer nanocomposite . the methods overcome nanoparticle dispersion issues arising from melt blending processes .