Electron behaviour around the onset of magnetic reconnection