Is using hand sanitizer okay?

Been using a lot when i’m not near a sink to wash my hands, but heard it could be dangerous for the baby! is that true?