dioxus/packages/autofmt/tests/samples/spaces.rsx
Jonathan Kelley 828cc502f1
Fix: #2604, Fix: #2240, Fix: #2341, Fix #1355 - Better error handling and and spaces handling in autofmt (#2736)
* add new autofmt sample
* Feat: implement rustfmt::skip support for rsx
* generally improve error handling with better expect messages
* wip: nested rsx formatting and expression formatting
* nested rsx formatting works
* collapse autofmt crate
* cast indent through macros
* use proper whitespace
* no more eating comments!
* Use proper error handling
2024-07-30 18:36:13 -07:00

14 lines
417 B
R

rsx! {
if let Some(Some(record)) = &*records.read_unchecked() {
{
let (label, value): (Vec<String>, Vec<f64>) = record
.iter()
.rev()
.map(|d| (d.model.clone().expect("work"), d.row_total))
.collect();
rsx! {
BarChart { id: "bar-plot".to_string(), x: value, y: label }
}
}
}
}