I guess it depends how strong the squalls are. I've always thought that you head into the approaching squall. The idea being to get it overwith fast. However, I've been caught out in microcells with 60 knot winds and with sails down and both engines at full power have been unable to make any headway.
Should this happen, I trust you all have your track enabled on your GPS. I go with the wind and with near zero visibility use the track on my GPS to keep me floating on the blue wet stuff. This works for almost all scenarios, but the last time out we were actually struck by lightning.
We can't control the elements, all you can do is minimize the risks to boat and crew.