But then there is a change in the company/team, and they decide to switch to a new tech stack. You don't know this tech stack, you don't like it, and it has little prospect for future employment (think: old/not popular stack).
Would you quit/start looking for a new job immediately? Would you give it a try first and see how it goes?