Skip to content

Commit 914f7e1

Browse files
committed
Cleanup README
1 parent 72ccea5 commit 914f7e1

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

template/README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ When you run `create-react-app`, it always creates the project with the latest v
118118

119119
To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
120120

121-
In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
121+
In most cases bumping the `react-scripts` version in `package.json` and running `npm install` (or `yarn install`) in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
122122

123123
We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
124124

@@ -366,20 +366,20 @@ If you use a custom server for your app in production and want to modify the tit
366366
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`:
367367

368368
```sh
369-
npm install --save react-router
369+
npm install --save react-router-dom
370370
```
371371

372372
Alternatively you may use `yarn`:
373373

374374
```sh
375-
yarn add react-router
375+
yarn add react-router-dom
376376
```
377377

378-
This works for any library, not just `react-router`.
378+
This works for any library, not just `react-router-dom`.
379379

380380
## Importing a Component
381381

382-
This project setup supports ES6 modules thanks to Babel.<br>
382+
This project setup supports ES6 modules thanks to Webpack.<br>
383383
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.
384384

385385
For example:
@@ -513,9 +513,11 @@ If you are concerned about using Webpack-specific semantics, you can put all you
513513

514514
## Adding a CSS Modules stylesheet
515515

516+
> Note: this feature is available with `[email protected]` and higher.
517+
516518
This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the **[name].module.css** file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format **[filename]\_[classname]\_\_[hash]**.
517519

518-
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](#adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: *[name].module.scss* or *[name].module.sass*.
520+
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](#adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: _[name].module.scss_ or _[name].module.sass_.
519521
520522
An advantage of this is the ability to repeat the same classname within many CSS files without worrying about a clash.
521523

@@ -563,6 +565,8 @@ No clashes from other `.error` class names
563565

564566
## Adding a Sass stylesheet
565567

568+
> Note: this feature is available with `[email protected]` and higher.
569+
566570
Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)).
567571

568572
Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable.
@@ -584,7 +588,7 @@ This will allow you to do imports like
584588

585589
```scss
586590
@import 'styles/_colors.scss'; // assuming a styles directory under src/
587-
@import 'nprogress/nprogress'; // importing a css file from the nprogress node module
591+
@import '~nprogress/nprogress'; // importing a css file from the nprogress node module
588592
```
589593

590594
> **Tip:** You can opt into using this feature with [CSS modules](#adding-a-css-modules-stylesheet) too!
@@ -805,7 +809,7 @@ To learn more about Flow, check out [its documentation](https://flow.org/).
805809

806810
## Adding a Router
807811

808-
Create React App doesn't prescribe a specific routing solution, but [React Router](https://reacttraining.com/react-router/) is the most popular one.
812+
Create React App doesn't prescribe a specific routing solution, but [React Router](https://reacttraining.com/react-router/web/) is the most popular one.
809813

810814
To add it, run:
811815

@@ -1103,7 +1107,7 @@ We don’t recommend this approach.
11031107

11041108
> Note: this feature is available with `[email protected]` and higher.
11051109
1106-
If the `proxy` option is **not** flexible enough for you, you can get direct access to the Express app instance and hook up your own middleware.
1110+
If the `proxy` option is **not** flexible enough for you, you can get direct access to the Express app instance and hook up your own proxy middleware.
11071111

11081112
First, install `http-proxy-middleware` using npm or Yarn:
11091113

@@ -1206,7 +1210,9 @@ Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data
12061210

12071211
## Running Tests
12081212

1209-
> Note: this feature is available with `[email protected]` and higher.<br> >[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030)
1213+
> Note: this feature is available with `[email protected]` and higher.<br>
1214+
1215+
> [Read the migration guide to learn how to enable it in older projects!](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030)
12101216
12111217
Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try.
12121218

0 commit comments

Comments
 (0)