Water and electrolyte are part of the liquid environment on which cells in the body depend, just as the atmospheric environment is the environment on which people depend. Too low or too high oxygen concentration is fatal to people. Similarly, altered water and electrolytes can also lead to cell damage and even individual death.
The main loss of diarrhea is sodium chloride, KCl and water, which are all in these foods, so don't worry.
Infants and young children need more water, and they can't eat well when they are sick, so diarrhea is also very dangerous, so they should go to the hospital for rehydration treatment in time.