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
@@ -94,15 +95,15 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm
94
95
95
96
## How To...
96
97
97
-
### Install a Dependency
98
+
### Installing a Dependency
98
99
99
100
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`:
100
101
101
102
```
102
103
npm install --save <library-name>
103
104
```
104
105
105
-
### Import a Component
106
+
### Importing a Component
106
107
107
108
This project setup supports ES6 modules thanks to Babel.
108
109
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**:
156
157
@@ -182,7 +183,7 @@ In development, expressing dependencies this way allows your styles to be reload
182
183
183
184
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.
184
185
185
-
### Post-Process CSS
186
+
### Post-Processing CSS
186
187
187
188
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.
188
189
@@ -215,7 +216,7 @@ becomes this:
215
216
216
217
There is currently no support for preprocessors such as Less, or for sharing variables across CSS files.
217
218
218
-
### Add Images and Fonts
219
+
### Adding Images and Fonts
219
220
220
221
With Webpack, using static assets like images and fonts works similarly to CSS.
221
222
@@ -251,7 +252,7 @@ Please be advised that this is also a custom feature of Webpack.
251
252
252
253
**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.
253
254
254
-
### Install React Bootstrap
255
+
### Installing React Bootstrap
255
256
256
257
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.
279
280
280
-
### Display Lint Output in the Editor
281
+
### Displaying Lint Output in the Editor
281
282
282
283
>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.
317
318
318
-
### Add Flow
319
+
### Adding Flow
319
320
320
321
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