When both braking and swerving must be done to avoid an unexpected hazard, a rider should:

Because you need adequate traction to swerve safely, you should not brake and swerve at the same time. Instead, if you approach a hazard that requires you to brake and swerve, you should perform one action and then the other.
DMV Writen Test