-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
오류가 나요
20.01.14 14:31 작성 조회수 239
0
React.cloneElement(...): The argument must be a React element, but you passed null.
import React from 'react';
import { Form, Input, Button, List, Card, Icon } from 'antd';
const profile = () =>
{
return(
<div>
<Form style={{ marginBottom: '20px', border: '1px solid #d9d9d9', padding: '20px' }}>
<Input addonBefore="닉네임" />
<Button type="primary">수정</Button>
</Form>
<List
style={{marginBottom: '20px'}}
grid={{gutter: 4, xs: 2,md: 3}}
size="small"
header={<div>팔로워 목록</div>}
loadMore={<Button style={{width: '100%'}}>더 보기</Button>}
bordered
dataSource={['제로초', '바보','노드버드오피셜']}
rednerItem={item=>(
<List.Item style={{marginTop: '20px'}}>
<Card actions={[<Icon type="stop" />]}>
<Card.Meta description={item} />
</Card>
</List.Item>
)}
/>
</div>
)
}
export default profile;
해결방법좀 알려주세요.
답변을 작성해보세요.
1
0
0
0
0
조현영
지식공유자2020.01.14
antd를 node_modules에서 꺼내오지 마시고, cdn을 사용하세요. https://cdnjs.cloudflare.com/ajax/libs/antd/3.25.3/antd.js
0
Hea Nick
질문자2020.01.14
index.js:1 Fetch API cannot load file:///C:/Users/user/Desktop/NodeBird/ch1/front/node_modules/antd/lib/list/index.js. URL scheme must be "http" or "https" for CORS request.
이러한 오류가 떠요.
0
조현영
지식공유자2020.01.14
저도 처음보는 에러입니다.
antd 버전을 제 package.json의 버전과 일치시키셔야 할 것 같습니다.
npm i antd@제 강좌 버전
답변 7