Have you heard about “lifting state up”? I guess you have and that’s the exact reason why you’re here. How could it be possible that one of the 12 main concepts listed in React official documentation might lead to poor performance? Within this article, we’ll consider a situation when it’s indeed the case.
Container queries are always on the top of the list of requested improvements to CSS. The general sentiment is that if we had container queries, we wouldn't write as many global media queries based on page size. That's because we're actually trying to control a more scoped container, and the only reason we use media queries for that now is because it's the best tool we have in CSS.