People who worry about climate change have been in a state of high anxiety about President Trump’s ignorance about the issue, his assault on Obama-era policies designed to do something about it and the growing evidence that extreme weather events and other consequences of global warming, long predicted by mainstream scientists, are now upon us.

Along comes California — yet again — to make people feel better about the possibility of serious action. The state is taking new steps to reduce its own greenhouse gas emissions and, in so doing, it is reaffirming its willingness to lead on a matter of global and national concern when Mr. Trump will not.

On Tuesday, the State Legislature approved a bill mandating that by 2045 all of the state’s electricity come from renewable and zero carbon sources like wind, solar, hydropower and nuclear. The original goal was 50 percent renewables by 2030; this bill kicks the target up to 60 percent by 2030 en route to zero carbon by 2045.

The move is part of California’s broader effort to cut economywide emissions from all sources by 40 percent from 1990 levels by 2030, and stands in luminous contrast to Mr. Trump’s recent power plant proposal that would do essentially nothing to reduce emissions beyond what market forces are likely to achieve. Unlike President Barack Obama’s Clean Power Plan, the Trump proposal sets no performance standards, or targets, and would allow states to decide how — or even whether — to regulate climate-altering emissions from coal-burning power plants. Making his political intentions crystal clear, Mr. Trump traveled to West Virginia to highlight the plan and extol the virtues of “beautiful, clean coal.”