'props children react js is not defined
Im new in react, i dont know how to fix the error. You can visit this codesandbox for the error. Thanks before.
Solution 1:[1]
You forgot to pass in the props as parameter to the LayoutComponent.
const LayoutComponent = (props) => {
const { Content } = Layout;
return (
<Layout>
<Layout>
<Layout style={{ padding: "0 24px 24px" }}>
<Breadcrumb style={{ margin: "16px 0" }}>
<Breadcrumb.Item>Home</Breadcrumb.Item>
<Breadcrumb.Item>List</Breadcrumb.Item>
<Breadcrumb.Item>App</Breadcrumb.Item>
</Breadcrumb>
<Content
className="site-layout-background"
style={{
padding: 24,
margin: 0,
minHeight: 500
}}
>
{props.children}
</Content>
</Layout>
</Layout>
</Layout>
);
};
export default LayoutComponent;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Palladium02 |
