(CNN) As the Rev. Wendy Hamilton was leaving Union Missionary Baptist Church in Waterloo, Iowa, she turned to see some commotion in the choir.

"I looked up and said, 'Is Andrew up there singing with them? I guess we're not leaving yet. Ok, Amen!'"

What happened next went viral, because Andrew is Andrew Yang, the longshot, "I'll try almost anything" Democratic presidential candidate. Nearly 2 million people have viewed a clip of Yang singing and swaying with the choir on Sunday. Nearly as many seemed to have opinions about it.

Some prominent black leaders laughed, rolled their emoji eyes or posted memes of Forrest Gump fumbling through a gospel song. Some accused Yang of pandering. One said it was more " cute than cringe " while joking that an "official ruling" would be issued after next the "black people conference."

The episode is a reminder that religious communities have lots of rituals and rules, many of them unspoken and inscrutable to outside eyes -- including presidential candidates.

Non-verbal cues, like how comfortable a candidate seems while visiting a church, can be more important than policy prescriptions.

Churches, especially black churches, are places where people can lay their burdens down and be their true selves, said the Rev. Leah Daughtry , a prominent pastor who has advised candidates on reaching religious voters.

"We want to see if you are comfortable with us being who we are."

Singing is one thing. Wearing a choir robe is another

Hamilton, who is African American, was in the Iowa church as the Yang campaign's faith outreach director. She told CNN that the candidate's moment in the choir, which lasted all of two minutes, was spontaneous, genuine and joyful.

The choir invited Yang to sing with them, she said. One of its members offered him a red and blue robe. So Yang -- a candidate who has crowdsurfed and stuffed whipped cream in volunteers' faces -- did what he does. He joined in.

"It was wonderful," Yang told a gaggle of reporters afterward. "Because in my mind it's always better to be participating in an activity than observing it." Yang also told reporters he felt it would be rude to decline the robe.

Daughtry gave Yang points for clapping on the beat. But he crossed a subtle line, she said, when he donned a choir robe.

Yang posing with choir members for a photo last Sunday.

"I don't know who on his staff let him put the robe on. I would have stopped him," said Daughtry, a former top official in the Democratic National Committee and pastor at House of the Lord Church in Washington.

"It's not your choir. It's not authentic."

Hamilton dismissed the idea that Yang was pandering.

"Andrew Yang does not pander. Real recognizes real. That was a spiritual moment."

Daughtry, a board member with Black Church PAC , encourages candidates to visit African-American congregations. But when they do, she said, they should mind these three rules: Be yourself, keep your remarks short and don't leave until the service is over.

"We don't like people who leave early," she said.

Yang has some black celebrity endorsements but is struggling to win broad support

Raised in a secular household by Taiwanese immigrants, Yang said he appreciates the power of religious communities. The former tech executive also said his wife, Evelyn, is Christian, and their two boys attend Sunday school. His own spiritual life, Yang has said, "is a work in progress."

Comic Dave Chappelle has endorsed Yang.

But Yang has struggled to connect with most African-American voters, lagging far behind Democratic frontrunners Vice President Joe Biden and Vermont Sen. Bernie Sanders. Just 3% of registered black Democratic voters nationwide support his nomination, according to a recent Washington Post-Ipsos poll

Scholar: Liberals can look uncomfortable around African Americans

The night before Yang's appearance at the Baptist church in Waterloo, Hamilton told him to scrap some of his talking points. She advised instead him to get personal and talk about how his parents were once on a fixed income.

She also told him to be himself. Congregations are pretty good at sniffing out insincerity, she said. Hamilton would know, she's a pastor herself at a Metropolitan Community Church in Maryland and a truancy case worker public schools in Washington.

"The black church is one of the toughest crowds in America."

Democratic presidential candidate Pete Buttigieg attends a community-building event hosted by Christ Temple Apostolic Church in June 2019 in South Bend, Indiana

Twitter can be just as tough.

Eric McDaniel said he sides with those who accused Yang of pandering.

"It's like showing up at a Mexican restaurant in a sombrero," said McDaniel, an expert on the political mobilization of black churches, "or a mom trying to use teenage slang."

McDaniel said the incident points to a larger problem among liberals: They often look clumsy, uncomfortable or culturally illiterate around African Americans.

Take the choir robe. In many black congregations it's a big deal to join the choir. You can't just throw on a robe and start singing. You have to earn it, McDaniel said.

Even Daughtry, the pastor, said she wouldn't feel right wearing her church choir's robes. But she didn't think Yang was pandering.

"Pandering is when you show up before election day and we haven't seen you in twenty years."