question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve documentation about how to implement `antd` in `create-react-app`

See original GitHub issue

What 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 imports 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
BrodaNoelcommented, Jun 6, 2017

If you are busy guys, I can send a PR in these next days. Let me know if you need my help

0reactions
lock[bot]commented, Jun 6, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found