Improve documentation about how to implement `antd` in `create-react-app`
See original GitHub issueWhat problem does this feature solve?
We should avoid ejecting create-react-app
while implementing antd
.
What we should do?
In this documentation, we should purpose to include components on-demand (as it is described here), and purpose eject create-react-app
as the last option.
This discussion started in create-react-app
repo in this issue.
Proposal to fix:
Recommend to do import
s of all styles in App.js
component, and import the proper component inside each container that it will be used. Example:
In App.js
:
import React from 'react';
// ...
import 'antd/lib/button/style'; // or antd/lib/button/style/css'
import 'antd/lib/progress/style'; // or antd/lib/progress/style/css'
import 'antd/lib/checkbox/style'; // or antd/lib/checkbox/style/css'
In MyContainer.js
:
import Button from 'antd/lib/button';
What does the proposed API look like?
Just improve the documentation, adding that information.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Use in create-react-app - Ant Design
create -react-app is one of the best React application development tools. We are going to use antd within it and modify the webpack...
Read more >Implement ant-design (antd) in create-react-app #2463 - GitHub
My suggestion would be to ask ant design to publish a webpack consumable / module friendly build or use a maintained react-scripts fork....
Read more >Use Create-React-App with antd - Stack Overflow
Use a component from antd import React, { Component } from 'react'; import Button from 'antd/lib/button'; import './App.css'; class App ...
Read more >Tutorial to Install Ant Design library / Antd with Create React App
In this tutorial, I setup Ant Design in a Create React App project. I also install Ant Design with Less and Less Loader...
Read more >How to Customize a React Theme Using Ant Design - Specbee
Ant design (or antd) offers many rich UI components that can enhance your website or app experience. Check out some of them below...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you are busy guys, I can send a PR in these next days. Let me know if you need my help
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.