Aloysius Low/CNET

California is following in Hawaii's footsteps by committing to 100 percent clean energy.

Lawmakers in the state have passed a bill that will see it moving entirely to clean electricity sources by 2045, CBS reported Tuesday.

The vote comes as a report revealed Monday that California could lose up to two-thirds of its beaches and water supply due to climate change. Public polling showed the majority of Californians (about 72 percent) are supportive of the bill, although some business groups and utilities aren't in favour, citing job concerns.

As the US' most populous state, just over a third of energy in California comes from wind, solar or geothermal power, CBS said citing the US Energy Information Administration. Nine percent is derived from nuclear plants while 49 percent comes from natural gas, which the publication says is considered a "cleaner" fossil fuel.

Hawaii was the first state in the US to take this step, committing to 100 percent clean energy in 2017.