DioxusLabs / DioxusLabs/dioxus
Make behaviour of `match` match other control structures
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
Currently `match` behaviour does not match other control structures:
```rust
if let Foo = bar {
div {
// ...
}
}
```
but
```rust
match bar {
Foo =>
rsx! {
div {
// ....
}
},
}
```
`match` should behave as `if` or `for`:
```rust
match bar {
Foo =>
div {
// ....
},
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the RSX parser or expansion handles `if`, `for`, and `match` control structures. Compare the existing `match` behavior with the examples in the issue; done means a match arm can contain RSX directly, like the shown `if` and `for` forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100