You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
20
+
-[Adding Flow](#adding-flow)
21
+
-[Deploying](#deploying)
22
+
-[Something Missing?](#something-missing)
23
+
4
24
## Sending Feedback
5
25
6
26
We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues).
@@ -74,15 +94,15 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm
74
94
75
95
## How To...
76
96
77
-
### Install a Dependency
97
+
### Installing a Dependency
78
98
79
99
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
80
100
81
101
```
82
102
npm install --save <library-name>
83
103
```
84
104
85
-
### Import a Component
105
+
### Importing a Component
86
106
87
107
This project setup supports ES6 modules thanks to Babel.
88
108
While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
136
156
@@ -162,7 +182,7 @@ In development, expressing dependencies this way allows your styles to be reload
162
182
163
183
If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
164
184
165
-
### Post-Process CSS
185
+
### Post-Processing CSS
166
186
167
187
This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it.
168
188
@@ -195,7 +215,7 @@ becomes this:
195
215
196
216
There is currently no support for preprocessors such as Less, or for sharing variables across CSS files.
197
217
198
-
### Add Images and Fonts
218
+
### Adding Images and Fonts
199
219
200
220
With Webpack, using static assets like images and fonts works similarly to CSS.
201
221
@@ -231,7 +251,7 @@ Please be advised that this is also a custom feature of Webpack.
231
251
232
252
**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images). However it may not be portable to some other environments, such as Node.js and Browserify. If you prefer to reference static assets in a more traditional way outside the module system, please let us know [in this issue](https://github.com/facebookincubator/create-react-app/issues/28), and we will consider support for this.
233
253
234
-
### Install React Bootstrap
254
+
### Installing React Bootstrap
235
255
236
256
You don’t have to use React Bootstrap together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps:
Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap.
259
279
260
-
### Display Lint Output in the Editor
280
+
###Displaying Lint Output in the Editor
261
281
262
282
>Note: this feature is available with `[email protected]` and higher.
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
297
317
298
-
### Add Flow
318
+
### Adding Flow
299
319
300
320
Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this:
0 commit comments