There have been lots of posts about water (and worse) spilled on Mac portables. Turning upside down, covering the computer with uncooked rice and many other "cures" have been posted but, most of the time, fail to prevent damage, even if only "pure water" is the invader. The damage is done when the water hits the live logic board, so the usual interventions only prolong the inevitible--a complete rebuild or a new computer.
The bottom line is that , in the majority of cases, the computer is ruined, or the repair cost would almost buy a new one.
The absolute best proactive step is to have homeowners'/renters' insurance that covers accidental damage to computer equipment. AppleCare does not. Get a deductible low enough that you can cash-flow the deductible.
Other things to consider "before the fact":
---Don't eat or drink near your laptop.
---Don't let friends eat or drink near your laptop. Hide the computer when they come to visit.
---If you have friends with IQs lower than the legal speed limit in the US, give them a blessing and then go find some smarter friends.
---If you have a cat, be aware that many cats see an open notebook computer as a drop-off station for biological samples. At best they find the keyboard to be a warm place to sleep. Keep the lid shut, even if you walk away from the computer for only a few minutes. Most computer techs will not even look at a compuer that's been fouled by a pet; they view it as a biohazard.