Writers are often told it's pointless to chase the market. By the time your book is ready, the market will have moved on. Write a young adult book about wizards and everyone wants religious symbol thrillers. Write one of those and the world has moved on to vampires. Write a vampire story and it's minotaurs everyone wants.
"Write what you'd like to read." Makes sense, since you're going to be reading the hell out of it for a year or more. No point going over and over something you don't want to read in the first place. There's a catch to this, too. What if your tastes aren't mainstream enough?
For most writers, I'm willing to wait for the paperback to come out. There are a small handful for whom that doesn't cut it. I want the new book as soon as it comes out. (Sooner, if I can wrangle an advance copy out of them.) Only one has a secure income from writing alone. One works a day job. Another works his ass off as a freelance writer, doesn't even have a contract now. Another has just written a book that I think nudges its way into masterpiece territory, and may lose his contract.
Most of their books don't sell well, though all of them write rings around me. And they're who come to mind when I sit down to "write what I'd like to read." Explains a lot about my level of success.