Mechanically robust and electrically conductive hydrogels remain challenging to fabricate. Here, the authors present polymeric nanofiber networks with structural robustness and high electronic conductivity and show that cardiomyocytes cultured on these hydrogels exhibit spontaneous and synchronous beating.