-
Notifications
You must be signed in to change notification settings - Fork 389
Sync with reactjs.org @ 022c1b2f #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7fd8a8d
e3f43f5
cd7bfe7
f1e8fa4
5b6abc9
f5ccd7e
7abe468
aaefe69
d4f7a2c
6716745
18c7c0f
2819a0f
0569c21
0948bf5
e7a4bf6
022c1b2
2284e2a
2e8463a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent); | |
|
||
Whereas a component transforms props into UI, a higher-order component transforms a component into another component. | ||
|
||
HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reactjs/react-redux/blob/master/docs/api/connect.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html). | ||
HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reduxjs/react-redux/blob/master/docs/api/connect.md#connect) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be fixed in #167 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Уже исправлено. |
||
|
||
In this document, we'll discuss why higher-order components are useful, and how to write your own. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,10 +216,18 @@ Congrats! You've installed the latest version of TypeScript into your project. I | |
``` | ||
|
||
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler} | ||
The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run: | ||
The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be fixed in #166 |
||
|
||
If you use [Yarn](https://yarnpkg.com/), run: | ||
|
||
```bash | ||
yarn run tsc --init | ||
``` | ||
|
||
If you use [npm](https://www.npmjs.com/), run: | ||
|
||
```bash | ||
tsc --init | ||
npx tsc --init | ||
``` | ||
|
||
Looking at the now generated `tsconfig.json`, you can see that there are many options you can use to configure the compiler. For a detailed description of all the options, check [here](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed in #97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предложено исправление.