When component prop struct contains onlyChildren struct and view! macro is used to render it without child node(s), then compilation fails with an argument of type AppProps<'_, _> is missing.
Code compiles without issue and AppProps contains Children struct instance that has no child nodes.
Environment
Sycamore: 0.8.2
Additional context
This seems to be an edge-case in view! macro building the AppProps struct from component attributes and children. It manifests only in the case described above. Any of the following changes will make it compile:
add attribute to App component when rendering (requires adding field to AppProps struct)
add child node to App component rendering (even empty string "" will help)
Describe the bug
When component prop struct contains only
Children
struct andview!
macro is used to render it without child node(s), then compilation fails withan argument of type AppProps<'_, _> is missing
.To Reproduce
Expected behavior
Code compiles without issue and
AppProps
containsChildren
struct instance that has no child nodes.Environment
Additional context
This seems to be an edge-case in
view!
macro building theAppProps
struct from component attributes and children. It manifests only in the case described above. Any of the following changes will make it compile:App
component when rendering (requires adding field toAppProps
struct)App
component rendering (even empty string""
will help)