South Africa has experienced recurrent outbreaks of violence, often targeting migrants from neighbouring countries.