People used lanterns to light their homes before electricity was invented.