Donald Trump has said he will overturn a law that helps communities better weather the effects of climate change.