Is autism hereditary?

My niece and nephew are. I don't want to make more.Not a nice experience.