I realize not everyone will have that option, but I strongly believe being strongly opinionated about what I will work with has helped me in the long run by ensuring I've actually worked on things where I could feel motivated to deliver, and letting me focus my time on getting better at the technologies I do enjoy working with.
Of course that requires ensuring you build skills in areas where you can find jobs, and that you avoid jobs where you don't get to pick the technologies you're prepared to work with.
I hated Java as everyone was supposed to in school among my peers. Java was for lesser programmers. But, there was interesting job in Java available and after using it, I liked coding in Java better then previous languages I knew (C, C++ mainly).
I've been playing "avoid those jobs" for a while now and it's getting tiresome. There is a HUGE prejudice against people who never drank the OOP kool aide.