President Donald Trump could learn a thing or two from former President Barack Obama about how to handle hecklers.

Trump has infamously encouraged supporters to “knock the crap” out of people who protest him at rallies. Obama showed how it should be done Friday, however, when he was heckled while stumping for Democratic candidates Bill Nelson and Andrew Gillum in Miami, Florida, ahead of Tuesday’s midterms.

“Sir, sir, don’t curse in front of kids, come on. Don’t do that in front of them, come on,” Obama calmly told one heckler.

“We’re OK, we’re OK, we’re OK,” Obama continued, after the unidentified person was reportedly removed by security and the crowd stopped chanting the ex-POTUS’ name.

“You know what? This is what I look forward to, is having a few hecklers to get me back in the mood. You know, it’s like, I enjoy that. You always gotta have a few in order to know that you’re on the campaign trail,” he said.

Obama used similar tactics to thwart a second heckler, who interrupted his comments on health care.

“Hold on a second. Sir, sir. Here’s the deal, if you support the other candidates, then you should go support the other candidates. Don’t be here,” said Obama, before telling the heckler to not “come hollering here.”

"Don't curse in front of kids, come on," former Pres. Barack Obama tells a heckler in Miami, Florida.



"This is what I look forward to, is having a few hecklers to get me back in the mood," he jokes. https://t.co/oE0zczjPDR pic.twitter.com/gNCLWSRCkd — ABC News (@ABC) November 2, 2018