Can a baby sleep in a rock and play ?

ka

We don’t have space for even a bassinet....Is it unsafe for a newborn to sleep in a rock and play untill there big enough for a pack and play?