A Black female police officer received praised on social media for how she handled a suspect yelling a racial slur at her.