Just an important bit of context: Water doesn't damage most electronics, especially not the solid-state hardware in a modern computer.
What does damage is short circuiting the electronics, which water can do.
As long as you cut power ASAP, remove and dry the battery (the most water-sensitive part of most computers), and make sure that everything is 100% dry before powering it back on again, you should be good, no matter how wet things got
This assumes that your electronics are wet with water. If you poured something more sinister into your computer, like sugary soda or beer, you probably need to rinse things off with alcohol and distilled water (therefore making things a LOT more wet) before drying it out and powering it back on.
The caveats are:
LCD screens: they have lots of layers. Water between layers should be avoided if at all possible, as it will likely degrade the picture quality.
Optical drives: moving greased parts with high precision optics and microscopic tolerances. Any dissolving of lubricant or deposition of residue could compromise the function of the drive.
Hard Drives: should be sealed quite well with inert gas, but if any water gets in, it will fail catastrophically and will require disassembly for any chance of data recovery.
Batteries: They can't be turned off, and can explode if shorted out.
Oils: if you spill oil into a computer, it probably won't short anything out (depending on the oil), but you're going to have to completely take whatever you dumped oil into apart and meticulously clean it with a toothbrush and dish soap.
Immediately remove the battery/power, then use a bunch of silica gel packs that have been dried out instead of rice: They're commonly available and won't get into things and cause problems down the road. Alternately, just take it apart as much as you can and set it in front of a fan to dry out.
Keep in mind, it might be too late but it's worth a try.
If you really want to try and save it and are tech savvy, try tearing it down and giving it an isopropyl alcohol bath but if you aren't, it'll do more harm than good. Keep in mind ISO can damage some parts.
Assuming it is a paper notebook, the determining factor is how soaked the pages are. If it is too wet, they may start to meld together making the notebook unusable.
The best thing to do is to actually heat up the book. I've cooked mine in the oven at very low heat, which allows it to dry out fast. My dad does a variant of the rice method for wet books where he fills a bag with rice and then places it in the sun. However, if the notebook is too wet and the pages are sticking together, doing either of these will instead turn your notebook into a solid block of wood. Instead, your best course of action is to try and fan out the pages by individually peeling them apart, then putting the splayed-open notebook somewhere moderately warm where it can slowly dry out under your careful observation.
It's when corrosion sets in things get unfixable. If you get to its insides before then some IPA and a decent scrub with something like toothbrush can clean it up.
The exception to this would probably only really be the battery and yeah that should be disconnected as the first step.
I know of this one time (last year) a window that was purposely kept shut was opened by a visitor and the notebook was rained upon. completely soaked. Kept in rice for about a month (changing the rice on some schedule), it booted up fine for a while. then died completely after a few weeks.
rice is only going to absorb water if it's directly touching the water. if it were good it absorbing humidity, you wouldn't be able to store it almost indefinitely in burlap as we've been doing for centuries.
I don't remember what I did afterward anymore, but I did once have a laptop get wet getting caught in a downpour in backpack that wasnt waterproof. It needed a new power supply.