R

ReflexKR

Reflex Docs

Reflex Basics, Hands-On

·

Course overview

1

Click and it changes: State and events

2

Now you see it: conditional rendering

3

Drawing lists: rx.foreach

4

Why doesn't if work? Compile time vs. runtime

5

Making it look good: components, props and style

6

Apps, pages and a fruit basket

Reflex Basics, Hands-On

Course overview

Start with a single button and work up to State, events, conditions, lists and compile time. A 40-minute course where every example is live

40 min6 lessonsReflex 0.10.0

This short course covers the concepts you'll use every day when building Reflex apps, and you learn them by clicking. Every example comes with a live, working preview right below it, so you can read the code and immediately try it out.

What you'll learn

  • Making the page change when you click a button (State and event handlers)
  • Showing different content depending on a condition (rx.cond)
  • Rendering a list on the page (rx.foreach)
  • Why you can't use if, for or len() in UI code (compile time vs. runtime)
  • Composing and styling components (children, props, style)
  • Creating an app and its pages

Why this order?

The official Reflex docs start with components and styling and build up from there. This course flips the order and starts with clicking a button to make a number go up. Once you've seen the page react, the remaining concepts follow naturally as "the things you need to make that happen."

  1. In Lesson 1 you make a number go up, and in Lessons 2 and 3 you change the page with conditions and lists.
  2. Lesson 4 answers the question "So why can't I just use if?" It's the most important lesson in the course.
  3. In Lesson 5 you style your UI, now that you know how things work under the hood, and in Lesson 6 you put everything together into a small app.

Before you start

You can try every example on this page without installing anything. If you'd like to type them out yourself, add the example function to your Reflex project's main file and register it with app.add_page(function_name).

Source material

This course is based on the official Reflex docs page Getting Started › Basics, with the order and explanations reworked for beginners. All example code was run and verified on Reflex 0.10.0.

Next →

Lesson 1 · Click and it changes: State and events

Get news about new lessons

We'll email you when this course gets new lessons or a follow-up course opens.

We collect: your email address · Purpose: news about new lessons or the launch of this course · Kept until: you ask us to remove it. We never use it for anything else or share it. Reply to any notice email and we'll delete it right away.

Questions & answers

Ask anything about this lesson. Questions from every language version of this page appear together.

Shown as plain text, without links or formatting.

R

ReflexKR

Learn Python and Reflex by doing. Every example was run and verified on Reflex 0.10.0.

ReflexKR is free, with no banner ads. If it helped you, you can support it with a coffee. ☕ Buy us a coffee

Affiliate disclosure
한국어English日本語简体中文EspañolDeutsch

© 2026 ReflexKR · Since 2026 · CC BY-NC 4.0

Built with Reflex