I’ve had a lot of time to think about my experience, and a lot of time to ponder the best response to social media “critics.” Many of those who attack a book or an author are not professional book reviewers — some admit that they haven’t seen the book that offends them. Four years ago, internet critics attacked another children’s book on the grounds that it was racist. That book, “A Fine Dessert,” contained images of smiling slaves (something that, for the record, I’m no fan of). The author of “A Fine Dessert,” Emily Jenkins, offered an apology and donated her advance to a nonprofit called “We Need Diverse Books.” However, the illustrator of “A Fine Dessert,” Sophie Blackall, defended the book, writing on her blog: “I cannot ensure my images will be read the way I intended, I can only approach each illustration with as much research, thoughtfulness, empathy and imagination as I can muster.” Evidently, her career as an illustrator (and author) has not suffered. One year after “A Fine Dessert” appeared, she won a Caldecott for a different book. And this year she won another.

I wish I had defended my book the way Blackall defended hers. I chose to remain silent, a course of action I regret. No doubt my silence came off as an admission of guilt — little different than vocally conceding to the critics, as the young adult author Amélie Wen Zhao did last week. Confronted with allegations on social media that her debut fantasy novel, “Blood Heir,” was racist, she asked her publisher to cancel the book, four months before the publication date. There is bitter irony in the fact that Zhao is a Chinese immigrant who grew up in a country known for its censorship, and now finds herself being told in America that her debut novel is offensive. In China, the government shuts down art it deems offensive. Here in America, we use social media.

According to descriptions online, “Blood Heir” is set in an imaginary world and depicts a society that includes an enslaved population, the Affinites. One of the book’s central characters is a slave who some early readers have assumed is African-American. (Her eyes are described as “aquamarine,” her skin alternately as “bronze” and her hair as “dark curls.”) On Twitter and Goodreads, early readers, some of whom understand the setting of the novel to be Russia, accused Zhao of “anti-blackness” and “blatant bigotry” for her portrayal of slavery. One Goodreads review reads: “This book is about slavery, a false oppression narrative that equates having legitimately dangerous magical powers that kill people with being an oppressed minority, like a person of color. This whole story is absolutely repulsive. … The Russian rep is fundamentally awful, the author didn’t even get the gendering of basic words right. The only disabled character is a villain who walks with a cane.”

In a post on her Twitter feed announcing the cancellation of her book, Zhao said that she has a different perspective on slavery than the one on which we tend to focus in America, explaining that she was not envisioning American slavery when she wrote the book. “The issues around Affinite indenturement in the story represent a specific critique of the epidemic of indentured labor and human trafficking prevalent in many industries across Asia, including in my own home country,” she said. That social media critics would expect that she, a Chinese immigrant, frame the depiction of slavery in her book to reflect an American narrative is the height of cultural solipsism and American arrogance.

[ Read our article about Amélie Wen Zhao’s book here ]

But the specific nature of these allegations is not the point. The point is that books should not be canceled just because some readers find aspects of them offensive. If every book that might offend someone were canceled in advance of its publication date, few books would wind up on store shelves. A few bullying critics pressured Zhao into depriving me and thousands of other people of the opportunity to read her book and come to our own conclusions. That’s not fair. And it’s not right.

In her announcement online, Zhao apologized for the “pain” she has caused with her book. The only way her book could cause pain is if it were dropped from a high-story window onto somebody’s head. The notion that a book can cause pain is just one more example of the tyrannical coddling of overly sensitive readers that defines this era. Zhao did not cause any pain with her book. But by making the decision to cancel, she will indeed cause pain — to herself and to other authors. By caving to the social media critics, she sets a chilling template for the future, and reinforces the power of the online mob.

There is a climate of fear right now among writers and editors and reviewers in the children’s book world. As in Salem, Mass., circa 1692, this sort of fear often prompts decent people to stay silent. I am well aware that what I’ve written here may get me in a lot of trouble online. I can already see the pithy put-downs, the references to my white privilege, the seemingly endless analyses of everything that’s wrong with what I’ve said from a moral/political/historical/cultural perspective, the sanctimoniousness, the snarkiness, the outrage. Friends and editors will tell me that I have just seriously shot myself in the foot, that I should have stayed silent, and let all this madness blow over. Except it’s not blowing over. And so, to the online mob, I say, and encourage Amélie Wen Zhao to say, as did the Duke of Wellington in response to a threat to expose his extramarital affair, “Publish and be damned.”

Jonah Winter is the author, most recently, of “Elvis Is King!”