The grocery store is not a fun place to be right now. Inside, you’ll likely find long lines, horrendously overworked employees, and frenzied shoppers who may or may not have washed their hands.

And if you came in looking for canned beans, well, there probably are none.

As coronavirus spreads across the country, Americans are #panicbuying. First it was the hand sanitizer, then toilet paper, then the components to make hand sanitizer yourself. Last week, people started stockpiling food. Lines snaked around the perimeter of Cotsco and Kroger, as customers left with carts full of pasta, frozen vegetables, flour and Spam. My husband purchased 70 days worth of Soylent: little white packets of “meal-replacement” powdered food.

There is not a food shortage in America. The problem is that everyone anticipates a food shortage, says Goker Aydin, a professor of operations management at the John Hopkins Carey Business School — and that anticipation messes with supply chains. It’s a self-perpetuating cycle, he says: People see empty shelves, freak out, and feel like they need to buy more, which means more empty shelves.

“In my 10 years of working at Trader Joe’s, I’ve never seen anything like it,” says Anna Matteo, who works at a store in downtown San Francisco.

Sooner or later, you’re probably going to have to brave the grocery store. To make that experience as pain-free as possible, I asked food and grocery experts for their best advice. It’s easy to get caught up in the panic, they say, emerging with large quantities of food that really isn’t that useful: chocolate-covered pretzels, Thousand Island dressing, an entire cart of corn dogs.

In the age of coronavirus, here’s how to do the grocery store right.

How to prepare

Remember: Even if you can afford to buy two months worth of food, don’t. Stockpiling “exacerbates economic inequalities,” says Aydin. As much of the country stocks their pantries, the families who really suffer are those who don’t have the money to buy more than they need. Aydin understands the impulse to stock up: When he saw the empty shelves at the grocery store, he grabbed some extra canned goods he hadn’t been planning to buy. But as much as possible, Aydin says, people should exercise restraint. At this point, it’s a good idea to have enough food to get through a few weeks — if enough food manufacturers and grocery store employees get sick, he says, supply chains could slow — but no need to go overboard. It’s important to balance what is “individually optimal” with what is “socially optimal for everyone,” he says.

Go ahead and make a list. But don’t expect to get everything on it. Especially when the store is crowded, with people frantically grabbing things off shelves, a grocery list can be helpful, says Jennifer Chandler, author of “The Southern Pantry Cookbook,” a book about cooking with nonperishable ingredients. It’s easy to get overwhelmed and forget the basics. That said, it’s important to be flexible. Shoppers should “go into the store with an open mind and creative thinking,” says Matteo. “Just come in thinking, I’m gonna get what I can get.” Pivoting is okay, says Deb Perelman, author of the Smitten Kitchen cookbooks. It can make a meal even better than the original, even. A really good recipe is “going to work and be forgiving,” she says. If you have to make a substitution — maybe cannellini beans for black-eyed peas — just do some Googling and adjust the cooking time.

When to go

Mornings are “terrible,” but they’re also the best time to shop, says Matteo. Deliveries generally happen at night or early in the morning, so shelves will be fullest right when the store opens. Usually mornings are fairly quiet at Trader Joe’s, she says, but not anymore. This weekend there was a line around the building to enter the store when it opened at 8 a.m. “It was like a mob,” she says, “a flash mob.” By 10:30 a.m., she says, “pretty much all our cold stuff was gone.” Trader Joe’s recently narrowed its hours, staying open from 9 a.m. to 7 p.m., instead of 8 a.m. to 9 p.m. “There is nothing in the store by 5 o’clock anyway,” says Matteo.

What to buy

It’s okay to treat yourself. As restaurants and bars are closing, you might have some extra money to spend on groceries. It’s a good chance to “treat yourself kindly,” says Perelman. She doesn’t often buy pork chops, but she bought some for dinner on Tuesday — because she’s at home, with time to cook and why not? A surprising number of people have been requesting her more time-intensive recipes, she says — her 18-hour no-knead bread, or her “crazy lasagna where you make the noodles yourself.” For people who like to cook, she says, it might be a nice opportunity to “slow down.” If cooking isn’t really your thing, Chandler suggests treating yourself with some salamis and hard cheese that will last in the fridge. “Then you can have a glass of wine with it and still feel like you’re normal.”

Frozen fruits and veggies are just as good as fresh, says Perelman. “When you get them frozen, you’re not getting any kind of compromised quality.” Fresh greens take up a lot of space in the fridge, and most go bad quickly, she says. Especially if you’re cooking the vegetables to put in a stew or soup, frozen is easier anyway. For breakfast, she recommends a smoothie made from all frozen fruit, like mango and mixed berries. You can even throw in an old banana, she says: It’ll taste the same.

Canned tomatoes are magic. Chandler is a big fan of canned tomatoes, especially if they’re fire-roasted. The possibilities are infinite, she says: salsa, omelets, tomato soup, pasta sauce, a “jazzy” complement to some black beans.

Buy the ingredients for a “sturdy” salad. The problem with many lettuces — and by extension, many salads — is that they go bad very fast. But salads are still possible during coronavirus, Perelman says: They just need to be “sturdy.” She suggests salads with celery, carrots and cabbage, vegetables with a relatively long shelf life. To complement the vegetables, she says, shred some cheese or sprinkle some nuts. (Stick the nuts in the freezer to keep them from going rancid, she says.) These kinds of salads also make great leftovers.

How to act while you’re there

Be kind. Remember that grocery store employees are probably working extended shifts — and they’re risking their health to be there. “Honestly a simple thank you would help,” says Matteo. “Just show us that you appreciate us.” A few people thanked her this weekend, she adds, and it really helped.

Keep your distance. It’s extremely difficult to restock the shelves during store hours, Matteo says. When customers see her come out with a pallet of new supplies, she says, they start to swarm. At one point this weekend, she says, she tried to take out a load of bacon, but couldn’t reach the shelves. There were too many people around her, crowding into her personal space. “I wanted to be like, ‘My life is more important than this strip of bacon.’” If customers want to help, she says, they can bag their own groceries.

When grocery shopping will go back to normal

It could be a while. Even though demand now is high, supply chains might not necessarily adjust to meet it, says Aydin. “Manufacturers don’t have the incentive to ramp up production,” he says, because it’s unclear when the increased demand will subside. There are a lot of “what ifs” right now, Aydin says, because no one knows how long the coronavirus will last, and how many food and grocery workers will be affected.

Take your business to an Asian grocery store, says Matteo. Many of them are relatively empty right now, combating the racism associated with the coronavirus. “People should check them out,” Matteo, the Trader Joe’s employee, says. “They have way bigger bags of rice than we do.”

A whistleblower alleges mass hysterectomies at an ICE detention center. The U.S. has a brutal history of forced sterilizations.

Low-income women of color have long been targeted

These moms have a lot in common but faced a big difference: One got paid maternity leave and one didn’t

Once they delivered, their paths diverged

An Ohio county had the second-highest infant mortality rate in the nation. Then they started listening to Black moms.

Black infants across the United States continue to die at more than two to three times the rate of White babies