Early labor?

I’m 27 weeks pregnant and last night I had thick,clear like discharge come out. This morning I woke up with the worst cramping I’ve ever had. It was that bad I remember having a dream before I woke and I was complaining about the pain in my dream! 😥

Had anyone experienced this? Should I go to the ER or is it a braxton hick contraction, or?

My first pregnancy and I have anxiety so just want some help.