Retrofitting a home to use electric appliances in place of gas involves some serious money.
California plans on stop installing new ones in 2030. There is no talk of retrofitting houses, except when the homeowner wants to. Obviously, the heaters installed up to 2030 will one day need replacing.
Seriously, heat pumps are so much more efficient, and allow you to use whatever energy source is available. It might make sense to replace a gas heater, especially if it is old.
And sometimes the electric stuff is more comfortable. I get as long of hot showers as I want now that I went with an instant water heater. The old gas or oil heated water heaters used to have their pipes break off in their tanks, and you would get only 5 minutes of hot water. It was terrible.