Addendum: I believe the basis for electrolytes is salt and water; the sugar is there for taste. You will find the WHO recipe has a similar Gatorade kind of taste. That’s the sugar and salt flavors mixed. Perhaps the sugar changes the water polarity? But you can do what ever you want after 1L of water + 1/2 tsp salt and some sort of sugars. 1/8 tsp (pinch) baking soda is another popular addition.
> An electrolyte is a medium containing ions that are electrically conductive through the movement of those ions, but not conducting electrons. This includes most soluble salts, acids, and bases dissolved in a polar solvent, such as water.[0]
You need to have the sugar because it is required to transport sodium across the cell membrane in the intestine. Without the sugar you will not absorb the salt, which is what helps maintain hydration and electrolyte balance. This discovery has possibly saved roughly as many lives as antibiotics.
I've recently started using REDMOND Re-Lyte Hydration Electrolyte Mix, and it has been working well for me. I know you can make your own electrolyte mix at home, but I find that the convenience makes it easier for me to adhere to some kind of hydration routine.
If it's one of those fizzy tablets you put into water then magnesium carbonate and potassium carbonate work too as long as they contain citric acid. They will react (the fizzing) and create the citrate.
Another source of potassium is "low sodium salt". This is often the cheapest form of potassium you can easily get.