The stock market is changing, says Jim Cramer. And investors need to change, too.

“The bull is dead, long live the bull,” Jim Cramer shouted to his Mad Money viewers Thursday. The stock market is pivoting, he said, and you need to pivot with it, whether you like it or not.

The lesson of this stock market is simple. When the Federal Reserve is aggressively raising rates, two things are true. First, whatever has been working, isn’t going to work anymore. Second, everything that hasn’t been working just got a new lease on life.

Case in point, Amazon  (AMZN) – Get Amazon.com, Inc. Report, the tech bellwether that’s down 5% for the year, despite still posting great earnings. You can learn a lot about a stock by what happens after it reports. If the numbers are great, but investors just don’t care, that’s a problem for a $1.6 trillion company.

Compare that to stocks like Eli Lilly  (LLY) – Get Eli Lilly and Company Report or Conagra Brands  (CAG) – Get Conagra Brands, Inc. Report or Church & Dwight  (CHD) – Get Church & Dwight Co., Inc. Report. These are all recession-proof names, and the market is eating them up, even if the earnings aren’t that spectacular.

There were only two tech names that Cramer felt were worth considering, Alphabet  (GOOGL) – Get Alphabet Inc. Class A Report and Meta  (FB) – Get Meta Platforms Inc. Class A Report. Businesses depend on Google in good times and in bad, he said, and as for Meta, nobody knows how to copy the best features from everyone as well as Facebook.

So while you may still want to hold onto those formerly red-hot tech names, do you self a favor, go buy some Target  (TGT) – Get Target Corporation Report, which was up 5.6% today, proving once again why it’s an essential retailer.

To sign up for TheStreet’s free Daily Booyah! newsletter with all of the latest articles and videos please click here.