California is not the first state with such ambitions - in 2015, Hawaii established a goal of 100 percent renewable electricity sources by 2045.
California's governor and host Jerry Brown, whose crusade for clean energy started in the 1970s, set the tone by approving landmark legislation Monday that commits his state to purging Carbon dioxide from its electricity grid by 2045.
California is the second U.S. state after Hawaii to commit to carbon-free energy.
The twin actions Monday were created to be a drastic opening gesture by the governor, just before he will host a meeting of global leaders on the issue in San Francisco later this week. It also requires that 50 percent of the state's electricity come from renewable energy by 2026 and 60 percent by 2030, up from the current level of 32 percent. It's merely a goal, with no mandate or penalty for falling short.
California has established an ambitious goal of relying entirely on zero-emission energy sources for its electricity by the year 2045.
To support energy storage deployments and greenhouse-gas reduction goals, two additional energy storage bills that complement SB 100 await Governor Brown's signature. "But it must be done", said Mr. Brown, a Democrat who leaves office after the November election.
The state would then aim to use only carbon-free sources to generate electricity by 2045.
Last year Mr Trump said he would pull the USA out of the deal and negotiate a new "fair" deal for United States businesses. The bulk of that is solar energy.
Critics have argued that the bill is unrealistic and will compound the state's problems with rolling brownouts and high energy prices.
California has repeatedly clashed with the federal government's policies on climate change, immigration and other issues since Trump became president.
To deal with significant problems - namely the need to keep a steady supply of electricity even at night when the sun isn't shining and during times when the wind isn't blowing, the previous laws defined renewable energy to include not only solar and wind, but also geothermal energy, biomass and hydroelectric power from small dams.
NPR's Planet Money reported that on a sunny day this June, almost 50 percent of the state's electricity came from solar energy alone.
If the EPA is returning power to the states, California's plan shows what some states may do with that power.
"California must take a stand and tell the world we are, as always, undeterred by those who wish to stop our progress and move backwards", Schwarzenegger wrote.