Phase change materials (PCMs) are highly attractive for nonvolatile electrical and all-optical memory applications because of unique features such as ultrafast and reversible phase transitions, long-term endurance, and high scalability to nanoscale dimensions. Understanding their transient characteristics upon phase transition in both the electrical and the optical domains is essential for using PCMs in future multifunctional optoelectronic circuits. Here, we use a PCM nanowire embedded into a nanophotonic circuit to study switching dynamics in mixed-mode operation. Evanescent coupling between light traveling along waveguides and a phase-change nanowire enables reversible phase transition between amorphous and crystalline states. We perform time-resolved measurements of the transient change in both the optical transmission and resistance of the nanowire and show reversible switching operations in both the optical and the electrical domains. Our results pave the way toward on-chip multifunctional optoelectronic integrated devices, waveguide integrated memories, and hybrid processing applications.