The three main ingredients in pedialyte are potassium, chloride and sugar. It is highly recommended as a re-hydration agent for "mild to moderate dehydration." If your child is experiencing more severe dehydration, it may be time to see a doctor. Pedialyte provides electrolytes, but does not help fight the bad bugs. Using coconut water preemptively works wonders. However, it is not a 1:1 replacement for the minerals found in pedialyte. Coconut water has good potassium content, but only contains about 300mg of sodium chloride per liter. To match pedialyte's contents, it would take the addition of approximately 1/4 tsp of salt. Coconut water has an appropriate amount of sugar. Per 100L, coconut water contains around 2.7g glucose and 2.4g fructose, compared to 2.5g dextrose (glucose) in pedialyte. Additionally, it does not contain large amounts of sucrose, which can worsen diarrhea. (source) That being said, I personally do not use pedialyte. Even if I wanted to (which I don't!), the additives would make my son sicker. I try to prevent a risk of dehydration first, through the use of salted broth (made with kombu) and a variety of specific fermented beverages that help fight the disease as well.