Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/components/conditional_rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ You can use [var operations]({docs.vars.var_operations.path}) with the `cond` co
The [`rx.match`]({library.dynamic_rendering.match.path}) component in Reflex provides a powerful alternative to`rx.cond` for handling multiple conditional statements and structural pattern matching. This component allows you to handle multiple conditions and their associated components in a cleaner and more readable way compared to nested `rx.cond` structures.

```python demo exec
from typing import List


import reflex as rx
Comment on lines 81 to 84
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line at top of code block

Removing from typing import List is the right call, but replacing it with an empty line leaves two consecutive blank lines at the start of the code block (the replacement blank line plus the separator blank line that was already there). The cleaner fix is to drop the line entirely rather than substituting it with whitespace.

Suggested change
```python demo exec
from typing import List
import reflex as rx
```python demo exec
import reflex as rx

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!



class MatchState(rx.State):
cat_breed: str = ""
animal_options: List[str] = [
animal_options: list[str] = [
"persian",
"siamese",
"maine coon",
Expand Down
Loading