我在这里遵循了 Input.Search 示例https://ant.design/components/input/
import { Input } from 'antd';
const Search = Input.Search;
ReactDOM.render(
<Search placeholder="input search text" onSearch={value => console.log(value)} />
, mountNode);
我收到以下错误:
未捕获的错误:元素类型无效:需要字符串(对于内置组件)或类/函数(对于复合组件),但得到:未定义
知道为什么吗?
<Input .../>
如果我使用该组件,它就可以正常工作。为什么会<Input.Search .../>
断?