# Lists, Scrolling & User Input

> Render long lists efficiently with virtualization, and build forms with text input, validation and keyboard handling. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/lists-and-forms
Last updated: 2026-11-28

Render long lists efficiently with virtualization, and build forms with text input, validation and keyboard handling.

Beginner · about 7 hours · difficulty 3/5

Learn first: [Layout Systems: Flexbox, Rows, Columns & Stacks](https://www.internhack.in/roadmaps/tracks/mobile/layout-systems)

Most apps are lists and forms. Doing both well is a core skill.

### Lists

Never render hundreds of items at once. Use **virtualized lists** that only render what is on screen:

- React Native: `FlatList`, `SectionList`, or FlashList for heavier lists.
- Flutter: `ListView.builder`. Compose: `LazyColumn`. SwiftUI: `List` or `LazyVStack`.

Give each item a **stable key/id** so the framework can reuse rows correctly. Add pull-to-refresh, pagination (load more when near the end), and clear empty states.

### Forms

- Controlled inputs: the input value lives in state and updates on every change.
- Choose keyboard types, `autoComplete`/`textContentType` for autofill, and `secureTextEntry` for passwords.
- Move focus to the next field on "next", submit on "done".
- Validate inline, and disable submit while a request is in flight.
- Libraries like React Hook Form (with Zod) or Flutter's `Form` widget reduce boilerplate.

### Pitfalls

- Using array index as a key causes wrong rows to update after deletes.
- Putting a virtualized list inside a scroll view in the same direction breaks virtualization.

**Good enough to move on:** you can build a paginated list of 1,000 items that scrolls smoothly, and a validated form with good keyboard behaviour.

## Key concepts

- **Virtualized lists**
- **Stable keys for list items**
- **Pull to refresh and pagination**
- **Controlled text inputs**
- **Keyboard types and autofill**
- **Form validation**
- **Form libraries**: React Hook Form, Formik, flutter_form_builder

## Mini project

Build a contacts app with a searchable, sectioned list of 500 generated contacts and an add-contact form with validation.

## Check yourself

Why is using the array index as a list item key a problem when items can be deleted?

## Free resources

- [React Native: FlatList](https://reactnative.dev/docs/flatlist) (React Native)
- [React Native: TextInput](https://reactnative.dev/docs/textinput) (React Native)
- [Compose: Lists and grids](https://developer.android.com/develop/ui/compose/lists) (Android Developers)

Previous: [Responsive & Adaptive Screens](https://www.internhack.in/roadmaps/tracks/mobile/responsive-adaptive) · Next: [Navigation Patterns](https://www.internhack.in/roadmaps/tracks/mobile/navigation)

## More in Screens, Layouts & Responsive UI

- [Components, Props & Styling](https://www.internhack.in/roadmaps/tracks/mobile/components-and-styling)
- [Layout Systems: Flexbox, Rows, Columns & Stacks](https://www.internhack.in/roadmaps/tracks/mobile/layout-systems)
- [Responsive & Adaptive Screens](https://www.internhack.in/roadmaps/tracks/mobile/responsive-adaptive)
- [Lists, Scrolling & User Input](https://www.internhack.in/roadmaps/tracks/mobile/lists-and-forms)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
