When Sonora Reyes set out to write their first novel, they thought it would be best to write what they know deeply: the pain of being "in the closet" at a Catholic high school.
Little did they know their book, "The Lesbiana's Guide to Catholic School," would come out in the middle of a nationwide debate about the place of LGBTQ identities in schools.
The book debuted just over a month after Florida Gov. Ron DeSantis signed the Parental Rights in Education bill into law. The law, which critics have dubbed the "Don’t Say Gay" law, bans lessons on sexual orientation or gender identity in some grades.
Efforts to ban books that contain LGBTQ content from libraries and schools have also been popping up across the country.
But for LGBTQ youth, literature can be a way to see themselves represented in ways they haven't before -- whether that's in love stories, coming-of-age novels or tales of adventure.
Reyes wasn't surprised at the backlash, but said they were disappointed.
More than 300 anti-LGBTQ bills have been seen across the country this year and at least nine states have implemented such policies.
Reyes said their book was titled as a "guide" intentionally.
"It is kind of disheartening to see all these bills getting passed, and everything that is in my book will surely be targeted by a lot of the bans," they said. "But I'm hoping that because [the title] is so blatantly clear … that it'll still be something that queer kids can find easily.”
MORE: Timeline: Key moments in fight for gay rightsThough the book's main character Yami has a very specific experience -- she is poor, Indigenous, Mexican and is struggling with her identity in Catholic school -- Reyes said the story is still universal.
"The focus of the story is so much about coming of age, learning to accept yourself, learning to accept your flaws, learning to celebrate yourself," Reyes said.
"Writing something you intimately know -- that you still have trauma to process through -- is not easy," they added. "So it was actually a really cathartic experience, even though it wasn't easy. It helped me to process a lot of the stuff that I didn't even realize I was still holding on to."
Authors like David Levithan, one of the first major mainstream queer young adult writers, say they've been fighting the battle against discrimination for decades.
"I'm glad our books are there to be lifelines, even when they're under attack," Levithan told ABC News. "It just makes what we do even more important."
Levithan wrote, "Boy Meets Boy" in 2003 and co-wrote the New York Times bestseller “Will Grayson, Will Grayson” with John Green in 2011. The latter was the first LGBTQ-related book to appear on the bestsellers list, according to Green’s website.
"Boy Meets Boy" envisions a world in which discriminatory ideologies are unacceptable and LGBTQ identities are the norm.
Levithan's novels served a generation of LGBTQ youth looking for acceptance in an unaccepting world. Now, despite fresh waves of attacks on the LGBTQ community, acceptance for same-sex marriage and LGBTQ identities are at an all-time high.
MORE: Amid anti-LGBTQ efforts, transgender community finds joy in 'chosen families'Still, for LGBTQ youth to thrive, they need to feel socially and emotionally supported, the Centers for Disease Control and Prevention says. Books like Levithan's and Reyes' are vital tools for making young LGBTQ adults feel seen, heard and welcomed.
Over the years, fans have told Levithan that they've "never seen a character like me before in a book and that really means a lot to me to know that I have a place in literature" or that a novel helped the reader talk to their parents or friends about their identity.
Some have told him that his books "saved their life."
"You really do think a lot about your readers and we think about what they need and what they're trying to express and what their identities mean to them," Leviathan told ABC News.
Emery Lee, the young adult author who wrote "Meet Cute Diary" and "Cafe con Lychee," says the books are meant to be an escape from the onslaught of attacks on LGBTQ youth.
"Cafe con Lychee" is a classic enemies-to-lovers romance, while "Meet Cute Diary" is a rom-com about a transgender teen's first love.
Lee says these stories are meant to provide comfort, a world for readers to engross themselves in.
"What I aim to do is to give trans people and queer readers at large a place where they can feel safe or they can feel comfortable," Lee said. "In the face of everything that's happening now, it feels almost like not enough, but at the same time, almost more necessary."
Overall, queer authors says they simply want LGBTQ youth to feel loved and know that it's not conditional.
"They should be loved fully and completely for who they are," Lee said. "And if they're not getting that, then that's something that's worth fighting for because it's what they deserve. It should be the bare minimum."