The present invention relates to reversible hydrogel systems. Particularly, the hydrogel of the present invention is made up of copolymers that can be a hydrogel when in an oxidized state and can be a solution when in a reduced state. A solution of the copolymer can be oxidized to form a hydrogel; and the hydrogel can be reduced to form a solution of the copolymer. Reversible nanogels can also be formed from a dilute solution of the copolymers. The hydrogel is formed with nanoparticles embedded therein to form a nanocomposite whose refractive index and modulus can be controlled by varying the amounts of nanoparticles and the polymer concentration of the hydrogel, respectively.