Rockers for babies should not be used for allowing the baby to sleep in without supervision however if you're supervising the baby at all times while they're in the rocker sleeping then it's okay for the baby to sleep in the rocker.
However do not allow the baby to sleep in the rocker overnight while unsupervised as it can cause death as it's not a safe place for the baby to sleep.
The best place for a baby to sleep safely at night when unsupervised is in a crib or baby bed.
When in a rocker or car seat and unsupervised the baby could become entangled in the straps and strangle to death.