Rather than switch stacks, better way to phrase it is that one should try to increase breadth and depth of knowledge.
By breadth I mean learning other programming language, frameworks, system design etc.
By depth I mean that - if you claim to know React - then get to know the deep detail of React, TS and the related ecosystem.
You can showcase the expertize by writing code, demoing it or sharing on github. Writing about it is another way