First off, I realize everyone has their own opinion for how to raise and train their dog. I also realize I am not an expert and my advice is simply opinion…
For dogs, growling is a form of communication. It’s actually one of the only forms of communication a dog has in his/her “social toolbox” that we humans naturally understand (without being educated on dog behavior). If you punish your dog for growling, whether by hitting the dog or simply by simply saying the word “no”, you are “turning off” that communication channel. If you punish him/her for that behavior enough, they’ll stop growling, but that doesn’t mean the underlying reason for the growl has been corrected (ie the behavior – growling – has been extinguished).
The result of the removal of the growling behavior from your dogs “social toolbox” creates a situation where your dog cannot communicating his/her intentions effectively. In a situation where a growl would give a clear warning to you or a stranger, your dog will not use that communication tool, and will instead move up the “ladder of aggression” and on to a bite. Thus, appearing to bite/snap without a clear warning (a growl). That type of situation is far more dangerous than a dog who growls and shows clear intent before he/she bites.
Unfortunately, punishing a dog for growling doesn’t “teach” the dog not to growl during a specific behavior, or not to do a specific underlying behavior (guard food, for example), it only “teaches” the dog not to growl – ever. This is why I’ve gotten into the habit of thanking my dog when they growl. I tell them “thank you”, and then stop doing what they are asking me not to do. This shows them that I’m listening to them, and understand them. I then approach the issues from a different angle (sometimes literally). I don’t let them “win” by allowing them to growl, I simply show them that I’m listening to them, and I work with them in a way that they are comfortable with. Often the growl is for a very specific reason and I can accomplish my intended goal by changing my approach.