> For AI agents: the complete documentation index is at [llms.txt](https://reflex.dev/docs/llms.txt). For a Markdown version, remove the trailing slash from the page URL and append `.md`. The docs home is available at [index.md](http://localhost:3000/docs/index.md).

# State

Reflex state connects your components to application data. Store values in an `rx.State` class, pass its vars to component props, and update those values from event handlers.

## Start with state and events

- [State overview](https://reflex.dev/docs/state/overview/) : define application state and connect it to your interface.

- [Base vars](https://reflex.dev/docs/vars/base-vars/) : store typed values that components can display.

- [Computed vars](https://reflex.dev/docs/vars/computed-vars/) : derive values from existing state.

- [Events](https://reflex.dev/docs/events/events-overview/) : update state in response to user interactions.

## Build reusable interactive components

Use [component state](https://reflex.dev/docs/state-structure/component-state/)  when each instance needs its own data. Use [conditional rendering](https://reflex.dev/docs/components/conditional-rendering/)  and [rendering iterables](https://reflex.dev/docs/components/rendering-iterables/)  to make your interface respond to state changes.
