When In My Feelings hit No 1 in the US last month, it meant not only that Drake had racked up more weeks at the top of the chart than any male solo artist in 60 years, it also established the latest in a long history of viral dance crazes.

The trend was kicked off by Instagram comedian Shiggy dancing along to the track, his moves perfectly synced to Drake’s lines: hands shaped into a heart when Drake asks if Kiki loves him; turning an imaginary steering wheel for lyrics about “riding”; waggling his finger back and forth when Drake asks Kiki to say she will never leave his side. Instagram users around the world followed suit, mimicking those moves and adding their own flair, often hopping out of a moving car while doing so, to the horror of the police. The #InMyFeelings challenge was born, making it the latest instance in which pop and dance have proved inseparable.

Tracks such as the Macarena and YMCA showed that the fusion of an easily translatable dance and a hooky ear-grabber could generate a buzz, but the advent of social media has made that task far easier. Even non-English speakers can follow the lovelorn story of In My Feelings via the sign-language-esque dance moves.

The dance that some call “the Shiggy” is far from the first to captivate global attention through the internet. Whether it is highly choreographed wedding entrances or dancing inmates in the Philippines, video platforms have sent dance viral. They have helped Cali Swag District teach everyone how to Dougie, turned the Harlem Shake into a chart smash and made the dab, the quan, the floss, the shoot, the whip and the nae nae staples of every high-school dance.

Dance moves can be created in one country and quickly spread to another – look at the gwara gwara moves from South Africa’s DJ Bongz, which have spread through Rihanna, Puff Daddy and many others. Ciara’s Level Up is now angling to become the latest #challenge dance craze (after the Texan R&B star attempted the Shiggy on a mountaintop in Cape Town).

This world of viral dance has exposed audiences everywhere to more and more indigenous styles. Much like the globalisation of fashion, food and general consumerism, the 80s and 90s saw western dance spread into every corner of the world, but the internet now allows non-western cultures to insist on their own styles being taken seriously. “The focus had been on street dance, ballet and vogue – every little kid trying to dance like Michael Jackson,” says Sherrie Silver, who choreographed Childish Gambino’s This is America video. “However, now, people are starting to discover more African-Caribbean styles.”

Elvis’s dance moves occasioned both lust and outrage in the US in the 1950s. Photograph: Snap/Rex/Shutterstock

Silver adds that dance itself is helping to create a new understanding of the African-Caribbean diaspora. “Through our talents and the people who have fought for our rights, people are more accepting of us as people, and therefore what we have to offer: the food, the dressing, the dancing and the culture in general,” she says. “It’s now acceptable to accept us.” The internet has long been lauded for enabling cultures to span the globe – but dance moves and pop songs make those cultures even more intensely tangible.

In her book Time and the Dancing Image, the critic Deborah Jowitt writes: “The dancer’s image has been subject to many alterations since the beginning of the 19th century in response to the immense social, political, scientific and technological upheavals that have characterised the period.” The outrage and lust surrounding Elvis Presley’s hip swivels said much about the repressed sexuality of the US in the 1950s, for example. Our current globalised dance culture, then, is a symbol of our networked age.

The dance historian Sally Banes argues that pop choreography can do more than reflect social change – it can create it, too. She writes that black choreographers in the mid-80s brought “explicitly political themes of black identity in their dances. Other political concerns – notably feminist and gay – surfaced in the 80s as well.” Advances in technology have helped make pop music the most powerful opportunity for those concerns to reach a wide audience.

Choreographers and artists are now using dance as a way to confront the chaotic, oppressive surroundings of the political moment. Experimental performers such as Christine and the Queens, Kelela and FKA twigs use surreal movement to express internal conflict. Twigs’s videos incorporate extreme contortion, double-jointed backup dancers and body horror – but also announce the body as something surreally beautiful. In Glass & Patron, she appears to give birth to a fluorescent scarf. Héloïse Letissier, who performs as Christine and the Queens, incorporates shades of Michael Jackson in her slippery steps and gravity-defying leans in the video for Tilted, but pushes them to a disorienting extreme to match a song about embracing your weirdness in a world that might try to deny it.

Beyoncé performing at Coachella. Photograph: Larry Busacca/Getty Images for Coachella

Beyoncé has moved poses from the black power movement and the “stepping” dance style of black college fraternities into the mainstream as a way to have conversations regarding racial injustice. Her choreography has flirted with militarisation as far back as Destiny’s Child’s Survivor, and stepping uses a heavily rhythmic, regimented group dance that recalls military drills. Part of Beyoncé’s fight against systemic racism – continued this week with her approval of young black photographer Tyler Mitchell for her Vogue cover – her recent dances are visceral expressions of African-American might, and expose the rest of the world to the storied traditions of black dance.

Similarly, the raw, visceral movements of the experimental electronic producer Arca and the expressive, glistening steps of Olly Alexander from Years & Years showcase the diversity of identity and expression that makes up today’s queer experience. Arca’s hoof-stilted wobbling and pained slaps to his face on Reverie suggest thrashing out complex sexual desires, while Alexander’s proud, limber sensuality suggests a man who has embraced his body and what it wants. For Alexander, changing the conversation is an essential part of his art. “I would hesitate to say: yes, I’m engineering this brave new frontier of queer music to infiltrate the masses with my gay agenda,” he told Paper magazine. “But that’s kind of what I want to do and has always been one of my goals. Now seems like the right time.”

Frank Gatson, a choreographer who has worked with Beyoncé, En Vogue and Usher, suggests that such dance moves – proud, politicised, punchy – match a time when elegance and minimalism have been snuffed out of daily life. “The world is ratchet,” he says, meaning base and distasteful. “We have a ratchet president. He’s hard. The world today runs on that hardness.” While balletic dance moves and controlled emotions have their place, there has been a rise of athleticism and aggressive energy in dance: Kendrick Lamar, for example, has featured samurai-like backup dancers.

A major recent flashpoint was Childish Gambino’s video for This is America. Detailed analyses have been made in the months since its release, dissecting the steps and finding secret meanings. Donald Glover flexes and writhes, teeth gritted and eyes wide; he alternates between African-inspired dance moves and blithe gunplay, as if his body is coming in and out of contact with different planes of black existence. “I was inspired by my culture and other African cultures,” says Silver, the 23-year-old choreographer. “Not many people were choreographing in my style and I decided I needed to fill the gap and show the world how amazing African dance is.”

In My Feelings, on the other hand, seems to be the purest expression of the joy of escapism. Its dance is comparatively straightforward, emotion-driven and crystal-clear, and came from a fan rather than an artist. But what they share is the way that pop music and dance fuel communion within a group of people.

Across the history of dance in pop music, and indeed within the space of a single concert, the spotlight has shifted between solo performers and the movements of groups, swinging towards the latter. Social movements such as #MeToo have led to a new kind of confidence and unity, Gatson says, mirrored by a return to group-based choreography. “At Coachella, Beyoncé shared the spotlight with 150 people,” he says. “I had a rehearsal in Los Angeles with En Vogue about a month ago, and all the kids at the studio were wanting to be choreographed in a big unit.” Beyond Beyoncé and Lamar, acts as wide-ranging as Jamie xx (in the video for Gosh) and Janelle Monáe (for Django Jane) have used groups to express community. Christine and the Queens operates within a mesmerising group for the Girlfriend video, punching and flexing as one – “it was very important to show that she was part of a group that was fighting with her,” her collaborators, the French contemporary dance collective (LA) Horde, told the New York Times. Challenges such as In My Feelings are, of course, communal, too – people want to join in with those they see online.

FKA twigs in M3LL155X.

“There has been a massive shift in the way we present and the way we create over the last 10 years,” says choreographer Paul Roberts. He has worked with everyone from One Direction to Paul McCartney, Katy Perry to Prince, and has seen social media platforms transform how dancers can express themselves, no longer reliant on being seen through clients or approved by industry professionals. That freedom, of course, also has downsides. “Sometimes it means ideas are not fully formed when they are put out,” Roberts says. “But overall this new ability to dance on demand is very healthy.”

The actor, dancer and choreographer Darrin Henson earned an MTV Video Music Award for his work with N Sync’s Bye Bye Bye. “Pop choreography today is very musical, but sometimes there’s no feeling,” he says. Viral dance crazes, and the dances of experimental and political pop stars, undo that hollowness, grounding dance in reality and imbuing it with raw feeling. However, Henson cautions: “Today’s choreography can be narcissistic – ‘selfie choreography’, I call it.”

Narcissistic or not, social media adds to diversity, when countless people can take part in an increasingly cosmopolitan dance scene. Roberts says: “The great thing about all this is that Sergei Polunin, one of our greatest classical dancers, can perform Hozier’s Take Me to Church, while Childish Gambino performs radical urban moves for This Is America, and both are applauded equally.”

As In My Feelings’ virality fades, the world is primed for whatever the next craze is, cameras at the ready.