Basketball Rule: Can you hit shooters hand if it is on the ball?

This question came up in many of our pickup basketball games.  So I emailed Donnie.   He is the NBA’s VP of Referee Operations.  Below was his response.

Q: I am having a debate with a friend about the hand being a part of the ball. He feels the hand is part of ball, but only when contact is incidental. My understanding is the hand is part of the ball in all circumstances, even going to the extreme of whacking a guys hand hard when he is shooting or dribbling.
A: You are correct. The hand is part of the ball when it is in contact with the ball. But keep in mind that only the part of the hand that is in contact with the ball is considered as part of the ball. So if you’re shooting and an opponent slaps your wrist, that’s a foul.