Does the Mage Slayer feat interrupt the triggering spell?

If a mage casts a spell within 5 feat of a character with the Mage Slayer feat, does the reaction of attacking the casting character go off first, or does the spell go off first?

The Mage Slayer feat (PHB, p. 168) says:

When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.

So which happens first?

Another reaction, the shield spell, says that when you are hit by an attack, you get +5 AC against all attacks, including the triggering one – but if the attack didn’t hit then the reaction couldn’t have been triggered. So I assume both interrupt the triggering action, and are then treated as occurring before the trigger.