My company isn't doing layoffs (yet), but the next year or so is precisely what I'm worried about. I've been at my company for about 1.5 years, and, absent coronavirus, I'm very confident I'd be in no danger of losing my job.
Right now, taking the risk of jumping to a new company doesn't sound appealing. But, if this goes on too long, I'm sure we'll end up doing layoffs at some point. We're already on a hiring freeze, and there are a lot of cost counting and cost saving projects going on right now.
If layoffs do come, though I may be better off than my many coworkers on visas, a job search in the middle of a recession does not sound like any fun. And, layoffs can tend to come in waves, so, even if I make the first cut, there could very well be another round coming in a matter of weeks or months. In that case, I would rather not be around for the second wave of layoffs. I think this scenario is the only one in which taking the risk of switching companies makes any sense.