React
v19.2
Search
⌘
Ctrl
K
Learn
Reference
Community
Blog
On this page
Overview
How declarative UI compares to imperative
Thinking about UI declaratively
Step 1: Identify your component’s different visual states
Step 2: Determine what triggers those state changes
Step 3: Represent the state in memory with
useState
Step 4: Remove any non-essential state variables
Step 5: Connect the event handlers to set state
Recap
Challenges