For AI agents: the complete documentation index is at llms.txt. Remove the trailing slash from a page URL and append .md to read its Markdown version. For the docs home, use index.md.

EventHandler

reflex_base.event.EventHandler

An event handler responds to an event to update the state.

Fields

event_actions

dict[str, bool | int]

Default: {}

Whether to preventDefault or stopPropagation on the event.

fn

Any

Default: None

The function to call in response to the event.

state

Optional[type[BaseState]]

Default: None

The state this EventHandler is directly attached to, if any.

Methods

get_parameters

get_parameters() -> Mapping[str, Parameter]

Get the parameters of the function.

Returns

The parameters of the function.