Skip to content

Commit 0a255fe

Browse files
committed
Merge branch 'master' of https://github.com/reactjs/reactjs.org into defer-babel-loading
2 parents 36e1185 + 2883359 commit 0a255fe

File tree

90 files changed

+252
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+252
-352
lines changed

.eslintrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
{
2+
"extends": [
3+
"fbjs"
4+
],
25
"plugins": [
36
"prettier",
47
"react"
58
],
69
"parser": "babel-eslint",
7-
}
10+
"rules": {
11+
"relay/graphql-naming": 0,
12+
"max-len": 0
13+
},
14+
"env": {
15+
"node": true,
16+
"browser": true
17+
}
18+
}

LICENSE.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This repo contains the source code and documentation powering [reactjs.org](http
1515
### Installation
1616

1717
1. `cd reactjs.org` to go into the project root
18-
1. `yarn` to install the website's NPM dependencies
18+
1. `yarn` to install the website's npm dependencies
1919

2020
### Running locally
2121

content/blog/2017-04-07-react-v15.5.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ We're discontinuing active maintenance of React Addons packages. In truth, most
113113
- **react-addons-create-fragment** – React 16 will have first-class support for fragments, at which point this package won't be necessary. We recommend using arrays of keyed elements instead.
114114
- **react-addons-css-transition-group** - Use [react-transition-group/CSSTransitionGroup](https://github.com/reactjs/react-transition-group) instead. Version 1.1.1 provides a drop-in replacement.
115115
- **react-addons-linked-state-mixin** - Explicitly set the `value` and `onChange` handler instead.
116-
- **react-addons-pure-render-mixin** - Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
117-
- **react-addons-shallow-compare** - Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
116+
- **react-addons-pure-render-mixin** - Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
117+
- **react-addons-shallow-compare** - Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
118118
- **react-addons-transition-group** - Use [react-transition-group/TransitionGroup](https://github.com/reactjs/react-transition-group) instead. Version 1.1.1 provides a drop-in replacement.
119119
- **react-addons-update** - Use [immutability-helper](https://github.com/kolodny/immutability-helper) instead, a drop-in replacement.
120120
- **react-linked-input** - Explicitly set the `value` and `onChange` handler instead.

content/blog/2017-09-08-dom-attributes-in-react-16.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Below is a detailed list of them.
163163
```
164164

165165
React 15: Converts `NaN`s to strings and passes them through.
166-
React 16: Warns and ignores them.
166+
React 16: Converts `NaN`s to strings and passes them through with a warning.
167167

168168
While testing this release, we have also [created an automatically generated table](https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/AttributeTableSnapshot.md) for all known attributes to track potential regressions.
169169

content/blog/2017-09-26-react-v16.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Refer to the previous announcement for [suggestions on how to migrate](/blog/201
151151
React 16 includes a number of small breaking changes. These only affect uncommon use cases and we don't expect them to break most apps.
152152

153153
* React 15 had limited, undocumented support for error boundaries using `unstable_handleError`. This method has been renamed to `componentDidCatch`. You can use a codemod to [automatically migrate to the new API](https://github.com/reactjs/react-codemod#error-boundaries).
154-
* `ReactDOM.render` and `ReactDOM.unstable_renderIntoContainer` now return null if called from inside a lifecycle method. To work around this, you can use [portals](https://github.com/facebook/react/issues/10309#issuecomment-318433235) or [refs](https://github.com/facebook/react/issues/10309#issuecomment-318434635).
154+
* `ReactDOM.render` and `ReactDOM.unstable_renderSubtreeIntoContainer` now return null if called from inside a lifecycle method. To work around this, you can use [portals](https://github.com/facebook/react/issues/10309#issuecomment-318433235) or [refs](https://github.com/facebook/react/issues/10309#issuecomment-318434635).
155155
* `setState`:
156156
* Calling `setState` with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.
157157
* Calling `setState` directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState from render.

content/docs/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ VoiceOver is an integrated screen reader on Apple devices.
263263
Refer to the following guides on how activate and use VoiceOver:
264264

265265
- [WebAIM - Using VoiceOver to Evaluate Web Accessibility](http://webaim.org/articles/voiceover/)
266-
- [Deque - VoiceOver for OSX Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts)
266+
- [Deque - VoiceOver for OS X Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts)
267267
- [Deque - VoiceOver for iOS Shortcuts](https://dequeuniversity.com/screenreaders/voiceover-ios-shortcuts)
268268

269269
#### JAWS in Internet Explorer

content/docs/addons-pure-render-mixin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ category: Add-Ons
88

99
> Note:
1010
>
11-
> `PureRenderMixin` is a legacy add-on. Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
11+
> `PureRenderMixin` is a legacy add-on. Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
1212
1313
**Importing**
1414

content/docs/addons-shallow-compare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ category: Reference
88

99
> Note:
1010
>
11-
> `shallowCompare` is a legacy add-on. Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
11+
> `shallowCompare` is a legacy add-on. Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
1212
1313
**Importing**
1414

@@ -19,7 +19,7 @@ var shallowCompare = require('react-addons-shallow-compare'); // ES5 with npm
1919

2020
## Overview
2121

22-
Before [`React.PureComponent`](/docs/react-api.html#react.purecomponent) was introduced, `shallowCompare` was commonly used to achieve the same functionality as [`PureRenderMixin`](pure-render-mixin.html) while using ES6 classes with React.
22+
Before [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) was introduced, `shallowCompare` was commonly used to achieve the same functionality as [`PureRenderMixin`](pure-render-mixin.html) while using ES6 classes with React.
2323

2424
If your React component's render function is "pure" (in other words, it renders the same result given the same props and state), you can use this helper function for a performance boost in some cases.
2525

content/docs/addons-test-utils.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ mockComponent(
112112

113113
Pass a mocked component module to this method to augment it with useful methods that allow it to be used as a dummy React component. Instead of rendering as usual, the component will become a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children.
114114

115+
> Note:
116+
>
117+
> `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.
118+
115119
* * *
116120

117121
### `isElement()`

0 commit comments

Comments
 (0)