Recent advances in Joule-heating synthesis of functional nanomaterials for photo and electrocatalysis