V

Volodymyr

3 min

Layout containers decide how a screen scrolls and stacks

Every screen sits on a container, and the wrong one shows up late. A ScrollView that worked with twenty items starts dropping frames at two hundred.

Nobody screenshots a container. It is the stack under the buttons, the list under the rows, the grid under the photos. But the container decides how a screen scrolls, how it performs at scale, and what happens when the content changes. Choosing it is the first React Native layout decision on every screen, and the one that is most expensive to change later.

Pick the container by what the content does

The question is not what the screen looks like. It is how much content there is and how it moves.

  1. A fixed amount that fits. A settings header, a profile card, a form with five fields. Plain Views with flexbox and the gap style are enough. Nothing scrolls, nothing virtualizes.
  2. A fixed amount that might not fit. A long form, an article, a detail screen. Wrap it in a ScrollView. It renders every child at once, which is fine for a screen's worth of content and wrong for a feed.
  3. A long list of similar items. Messages, products, search results. Use FlatList or FlashList. They only render rows near the screen, so two thousand items cost about as much as twenty.
  4. A long list in groups. Contacts under letters, events under dates. SectionList adds headers to the same virtualization.
  5. Tiles of equal size. Photo grids, app icons. FlatList with numColumns, or a plain grid when the count is small.
  6. Tiles of different heights. Pinterest-style feeds. A masonry layout, with heights known before images load.

The common mistake is case 2 grown into case 3. A ScrollView with a .map() inside works perfectly in the prototype and stutters once real data arrives, because it renders every row up front.

Grids are where layout gets playful

A grid is the one container that users notice, because its tiles invite touch. Home screens, photo pickers, and launchers all start from equal tiles in rows. The iOS 26 home grid is the familiar example.

A grid does not have to stay static under the finger. The grid magnification effect shows how much character a plain grid can carry once it responds to touch.

Containers also stack in depth

Layout is not only rows and columns. Sheets over screens, cards over cards, a split view with a resizable divider. These layer content in depth rather than in a line, and they bring their own problems: which layer receives touches, and what the layer below does while the top one moves. Stacked bottom sheets are a good stress test of that.

The keyboard is a container problem

A container that holds inputs has one more job: making room when the keyboard opens. That is why keyboard-aware scroll views exist as their own containers, separate from plain ScrollView.

The containers are only half of a screen. The components post covers the other half, the parts that sit inside them, grouped by the job they do.

When in doubt, ask whether the content can grow. If it can, start with a virtualized list, not a ScrollView, and the screen will not need a rewrite when the data gets real. Browse the containers in the Grid term and its neighbors in the catalog.