Skip to content

Commit d642fe7

Browse files
authored
Merge pull request #102 from reactjs/sync-022c1b2f
Sync with reactjs.org @ 022c1b2
2 parents 6e28409 + 06aaa9d commit d642fe7

7 files changed

+19
-15
lines changed

content/blog/2015-08-11-relay-technical-preview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ While React simplified the process of developing complex user-interfaces, it lef
1313

1414
Declarative data-fetching means that Relay applications specify *what* data they need, not *how* to fetch that data. Just as React uses a description of the desired UI to manage view updates, Relay uses a data description in the form of GraphQL queries. Given these descriptions, Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates views as data changes.
1515

16-
Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This colocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.
16+
Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This collocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.
1717

1818
Relay is in use at Facebook in production apps, and we're using it more and more because *Relay lets developers focus on their products and move fast*. It's working for us and we'd like to share it with the community.
1919

content/community/conferences.md

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1616
January 31, 2019 in Tehran, Iran
1717
[Website](http://reactiran.com) - [Instagram](https://www.instagram.com/reactiran/)
1818

19+
### Reactathon 2019 {#reactathon-2019}
20+
March 30-31, 2019 in San Francisco, USA
21+
22+
[Website](https://www.reactathon.com/) - [Twitter](https://twitter.com/reactathon)
23+
1924
### App.js Conf 2019 {#appjs-conf-2019}
2025
April 4-5, 2019 in Kraków, Poland
2126

content/docs/addons-test-utils.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Pass a mocked component module to this method to augment it with useful methods
139139

140140
> Note:
141141
>
142-
> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/test-utils.html#shallow-rendering) or [`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead.
142+
> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/shallow-renderer.html) or [`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead.
143143
144144
* * *
145145

content/docs/higher-order-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent);
1414

1515
Whereas a component transforms props into UI, a higher-order component transforms a component into another component.
1616

17-
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).
17+
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).
1818

1919
In this document, we'll discuss why higher-order components are useful, and how to write your own.
2020

content/docs/hooks-intro.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ We know that React developers are focused on shipping products and don't have ti
9797

9898
We also understand that the bar for adding a new primitive to React is extremely high. For curious readers, we have prepared a [detailed RFC](https://github.com/reactjs/rfcs/pull/68) that dives into motivation with more details, and provides extra perspective on the specific design decisions and related prior art.
9999

100-
**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** We are sharing this experimental API to get early feedback from those in the community who are interested in shaping the future of React — and we will iterate on Hooks in the open.
101-
102-
Finally, there is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative.
100+
**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** There is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative.
103101

104102
We intend for Hooks to cover all existing use cases for classes, but **we will keep supporting class components for the foreseeable future.** At Facebook, we have tens of thousands of components written as classes, and we have absolutely no plans to rewrite them. Instead, we are starting to use Hooks in the new code side by side with classes.
105103

content/docs/static-type-checking.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,18 @@ Congrats! You've installed the latest version of TypeScript into your project. I
216216
```
217217

218218
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler}
219-
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:
219+
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:
220+
221+
If you use [Yarn](https://yarnpkg.com/), run:
222+
223+
```bash
224+
yarn run tsc --init
225+
```
226+
227+
If you use [npm](https://www.npmjs.com/), run:
220228

221229
```bash
222-
tsc --init
230+
npx tsc --init
223231
```
224232

225233
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).

src/pages/index.js

-7
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,6 @@ Home.propTypes = {
310310
}).isRequired,
311311
};
312312

313-
function renderExamplePlaceholder(containerId) {
314-
ReactDOM.render(
315-
<h4>Loading code example...</h4>,
316-
document.getElementById(containerId),
317-
);
318-
}
319-
320313
const CtaItem = ({children, primary = false}) => (
321314
<div
322315
css={{

0 commit comments

Comments
 (0)