As an avid listener of classical music, I’ve heard lots of people make this comparison, mainly as a way to argue that classical music used to be way cooler back in the day (i.e., 200+ years ago) than people view it now.
But I can’t help but question if that’s necessarily accurate as a 1:1 comparison. After all, most historic composers were employed by noble courts, wrote works on commission from wealthy patrons for their private entertainment, and often debuted their major works in state theaters and opera houses where only the local elite would be in attendance.
So I get that most people aren’t trying to be academic when they say Mozart or Haydn or Beethoven were “rock stars” in their own time, but is there any sort of parallel in terms of their popularity or recognizability across class lines? Would the average Londoner have recognized Handel if he bumped into him on the street, or been familiar with any appreciable body of his work?
So the answer: were there rock stars back in the day? Yes! Were they composers? Welll..... no before about 1800, yesish afterwards. But even those composers who could reasonably be called "rock stars" in the 19th century shared something in common with their 18th-century counterparts: their stardom derived primarily from their status as performers, rather than composers.
Then, as now, what gets butts in seats is the star performer. Britney Spears became the biggest pop star of a generation without composing a single hook or producing a single beat. And the same thing is true throughout history. In the 18th century, the biggest, most lavish, maximalist-aesthetics thing was the opera theater. And the stars of the show, called castrati (because they were castrated as boys to maintain their soprano singing voice) were indeed wildly popular. /u/Caffarelli is our resident expert on all things castrati, and you may be interested in their post on female hysteria toward castrati.
One reason why composers couldn't often be the big stars is because the instruments they were typically proficient in -- such as the piano -- often didn't draw huge crowds. Unlike today, you couldn't really attend such a thing as a solo piano recital in the 1750s. If you heard the piano, it was either as an accompanying instrument for opera (the real draw), or it was performed in private among friends. It isn't really until the 19th century that a real market develops for virtuoso soloists outside of the theatrical genre of operas. But once that happens, there soon emerges a class of rock star pianists, violinists, etc. Except now, especially in the case of pianists, the people doing the performing would often times be capable performers as well. As a result, people like Paganini and Liszt, two of the biggest performers in their day, would compose works that they themselves could play to dazzle their audience. I talk a bit more about this here.
So the short answer, is that there were rockstars. But what made a rockstar was their ability to dazzle audiences as virtuoso performers, being a "pure" compoeser could pay the bills, and could even garner esteem! But composers hardly ever caused massive fanboying/girling the way performers did!