Genes play a role in both non-melanoma skin cancer and melanoma. However, genes are not as big of a driver in non-melanoma as they are in melanoma.
Limiting sun exposure is one of the best ways to prevent skin cancer. When you’re in the sun, wear sunglasses and sunscreen of at least SPF 30. You need to reapply it every hour.
Early detection of skin cancer is vital because it greatly reduces your risk of death. That’s why you should perform regular skin self examinations.
You should also visit a dermatologist often, so they can do a full scan of your skin. This is especially important if you have a family member with a history of melanoma or are fair skinned and are required to be out in the sun on a regular basis.