It's way too easy to start panicking and living in an anxiety-ridden world in this current layoff-rich tech economy. However, this is a very counterproductive mentality to have as a software engineer - This video covers the mindset shift you should make to actually set yourself for success against layoffs.
Here are the core points:
Related resources: