Riots are criminal attacks against innocent businesses and residents, which contribute nothing to any cause, and only results in aggressive reactions from police and governments.
The French govt has a long and proud tradition of violently oppressing protests.
This is truly unfortunate, and I do sympathize with protesters.
What exactly are the French people supposed to do?
Not hurting innocent people and local businesses would be a good start. There cannot be an effective protest without the support of the community. If you’re burning down the community, then you’ve only made more enemies.