Look before you jump!

Is it good to quit your current job before landing the next role? Or should you secure a new job before leaving?