Мне пришлось добавить antd / dist / antd.css вверху src / App.css.
@import '~antd/dist/antd.css';
.App {
text-align: center;
}
Я понял это из официальных документов antd для использования с Create React App
Итак, все необходимые шаги: установить antd
yarn add antd
Использовать компонент из antd
import React, { Component } from 'react';
import Button from 'antd/lib/button';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<Button type="primary">Button</Button>
</div>
);
}
}
export default App;
И импортировать antdcss в основной файл css (src/App.css)