Some women tell everyone they know that they are pregnant as soon as those two pink lines show up on the pregnancy test, while others wait until an ultrasound has been done or until after the first trimester. There is no right or wrong answer.
The reason some women choose to wait until after a heartbeat is detected or after they enter the second trimester is that statistically the chance of a miscarriage is much lower after these points. However, if you are the type of person who wants to share your pregnancy very early and you feel that even if you miscarried you would want your family and friends to know, then divulging your pregnancy as soon as possible is entirely the right choice for you.
For the woman who would not want to have to explain such a loss right away, potentially waiting a bit longer to spill the beans might be better. This is a personal decision that only you can make.