Fix #1938, allow explicit props
This commit is contained in:
4 files changed
+73
-44
No files matched your search
+3
-2
@@ -14,7 +14,7 @@ fn main() {
|
||||
|
||||
fn app() -> Element {
|
||||
rsx! {
|
||||
spreadable_component {
|
||||
SpreadableComponent {
|
||||
width: "10px",
|
||||
extra_data: "hello{1}",
|
||||
extra_data2: "hello{2}",
|
||||
@@ -34,7 +34,8 @@ struct Props {
|
||||
extra_data2: String,
|
||||
}
|
||||
|
||||
fn spreadable_component(props: Props) -> Element {
|
||||
#[component]
|
||||
fn SpreadableComponent(props: Props) -> Element {
|
||||
rsx! {
|
||||
audio { ..props.attributes, "1: {props.extra_data}\n2: {props.extra_data2}" }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user