Though the odd slap seems okay to you, for others it may be child abuse which may affect the child mentally their whole life.
Some people simply scold the child if they do something inappropriate but the most effective is education so they behave properly in the first place.