1
我跟着這裏的Input.Search例如https://ant.design/components/input/antd設計導入Import.Search問題
import { Input } from 'antd';
const Search = Input.Search;
ReactDOM.render(
<Search placeholder="input search text" onSearch={value => console.log(value)} />
, mountNode);
我得到了以下錯誤:
未捕獲的錯誤:元素類型無效:預期字符串(建-in組件)或類/函數(用於複合組件),但得到:undefined
任何想法爲什麼?
如果我使用<Input .../>
組件,它工作得很好。爲什麼<Input.Search .../>
中斷?
它的工作原理爲我好... http://codepen.io/sergiocrisostomo/pen/jVgWWm?editors=1010。仍然有問題? – Sergio
原來是一個版本問題。謝謝你的幫助。 – unekwu