组件参数无效。
错误信息示例
InvalidComponentArgs:传递给<MyAstroComponent>
组件的参数无效。
哪里出错了?
标题为“哪里出错了?”的部分Astro 组件不能通过函数调用的方式手动渲染,例如 Component()
或 {items.map(Component)}
。请使用组件语法 <Component />
或 {items.map(item => <Component {...item} />)}
。
错误信息示例
InvalidComponentArgs:传递给<MyAstroComponent>
组件的参数无效。
Astro 组件不能通过函数调用的方式手动渲染,例如 Component()
或 {items.map(Component)}
。请使用组件语法 <Component />
或 {items.map(item => <Component {...item} />)}
。