How to handle various relationships and personalities should be mandatory psychology 101 somewhere around beginning of high school. It would make whole mankind behave a bit better overall, no doubt there.
The problem with your comment is, kids are by far the biggest stressor in marriages. Wonderfully working, fully matching couples are pushed sometimes to their limits and beautiful relationships become just surviving hardships next to each other. You can't fully know how the opposite will handle this, even under good circumstances, god forbid something ain't right (like post natal health issues in kid or mother), even when trying to use psychology a bit. Sometimes it works, sometimes it fails in myriad ways. You could have felt your ex was the one for life while pro creating, thats happening during (brutally) easy times.