It depends on your technique. If you have the technique down it isn't difficult to rapidly decelerate on hills. It's mainly just a matter of bracing yourself, keeping your centre of gravity back and modulating the brake.
If you're not prepared for it and slam the front brake on your weight will shift forwards and you'll have lift off.