The song was written by Daniel Parker, Teddy Geiger and Daniel "Daylight" Kyriakides. Shawn Mendes takes pride in his songwriting abilities, though, and wasn't sure he wanted to record a tune that he hadn't penned himself. Mendes told Radio.com
, "I was thinking, I don't want to sing [it] because I only want to sing songs that I write."
"I was like, 'Well, let me just listen to this,' and I fell in love," he continued. "And man, it was just so cool to hear that. I remember before I heard it, I was like 'I really want to write a song where the bridge is a repetitive something, that just drills itself into your head.'"
"'Needle in a thread gotta get you outta my head,'" Mendes added quoting the song's bridge."When that bridge hit I was like, 'This is the song.' I had to have it."