Skip to content

Commit 4959dbe

Browse files
Merge branch 'master' into shallow-renderer
2 parents c528a02 + 7ffc6c7 commit 4959dbe

13 files changed

+47
-60
lines changed

content/community/articles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ permalink: community/articles.html
1414
- [Simple React Development in 2017](https://hackernoon.com/simple-react-development-in-2017-113bd563691f) - Joshua Comeau's guide to showcase how easy it can be to start modern React development.
1515
- [Visual Guide to State in React](https://daveceddia.com/visual-guide-to-state-in-react/) - Dave Ceddia's visual guide to React state.
1616
- [The Hands-On Guide to Learning React Hooks](https://www.telerik.com/kendo-react-ui/react-hooks-guide/) - Eric Bishard's step-by-step guide to learning React Hooks.
17+
- [How to Use the React Profiler Component to Measure Render Performance](https://medium.com/@adamhenson/how-to-use-the-react-profiler-component-to-measure-performance-improvements-from-hooks-d43b7092d7a8) - Adam Henson's article exemplifying a use case for `<React.Profiler />`.

content/community/conferences.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1212

1313
## Upcoming Conferences {#upcoming-conferences}
1414

15-
### React Conf Iran 2019 {#react-conf-iran-2019}
16-
August 29, 2019. Tehran, Iran.
17-
18-
[Website](https://reactconf.ir/) - [Twitter](https://twitter.com/reactconf_ir) - [Instagram](https://www.instagram.com/reactconf/)
19-
20-
### React Rally 2019 {#react-rally-2019}
21-
August 22-23, 2019. Salt Lake City, USA.
22-
23-
[Website](https://www.reactrally.com/) - [Twitter](https://twitter.com/ReactRally) - [Instagram](https://www.instagram.com/reactrally/)
24-
25-
### ComponentsConf 2019 {#componentsconf-2019}
26-
September 6, 2019 in Melbourne, Australia
27-
28-
[Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/componentsconf)
29-
30-
### React Native EU 2019 {#react-native-eu-2019}
31-
September 5-6 in Wrocław, Poland
32-
33-
[Website](https://react-native.eu) - [Twitter](https://twitter.com/react_native_eu) - [Facebook](https://www.facebook.com/reactnativeeu)
34-
35-
### React New York 2019 {#react-new-york-2019}
36-
September 13th, 2019. New York, USA
37-
38-
[Website](https://reactnewyork.com/) - [Twitter](https://twitter.com/reactnewyork)
39-
40-
### React Live 2019 {#react-live-2019}
41-
September 13th, 2019. Amsterdam, The Netherlands
42-
43-
[Website](https://www.reactlive.nl/) - [Twitter](https://twitter.com/reactlivenl)
44-
4515
### React Boston 2019 {#react-boston-2019}
4616
September 21-22, 2019 in Boston, Massachusetts USA
4717

@@ -92,9 +62,44 @@ June 15, 2020. Tel Aviv, Israel.
9262

9363
[Website](https://react-next.com/) - [Twitter](https://twitter.com/reactnext) - [Facebook](https://www.facebook.com/ReactNext2016/)
9464

65+
### React Week NY 2020 {#react-week-NY-2020}
66+
July 17, 2020. New York City, USA.
67+
68+
[Website](https://reactweek.nyc/) - [Twitter](https://twitter.com/reactweek) - [Facebook](https://www.facebook.com/reactweek)
69+
9570

9671
## Past Conferences {#past-conferences}
9772

73+
### React Rally 2019 {#react-rally-2019}
74+
August 22-23, 2019. Salt Lake City, USA.
75+
76+
[Website](https://www.reactrally.com/) - [Twitter](https://twitter.com/ReactRally) - [Instagram](https://www.instagram.com/reactrally/)
77+
78+
### ComponentsConf 2019 {#componentsconf-2019}
79+
September 6, 2019 in Melbourne, Australia
80+
81+
[Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/componentsconf)
82+
83+
### React Native EU 2019 {#react-native-eu-2019}
84+
September 5-6 in Wrocław, Poland
85+
86+
[Website](https://react-native.eu) - [Twitter](https://twitter.com/react_native_eu) - [Facebook](https://www.facebook.com/reactnativeeu)
87+
88+
### React New York 2019 {#react-new-york-2019}
89+
September 13th, 2019. New York, USA
90+
91+
[Website](https://reactnewyork.com/) - [Twitter](https://twitter.com/reactnewyork)
92+
93+
### React Live 2019 {#react-live-2019}
94+
September 13th, 2019. Amsterdam, The Netherlands
95+
96+
[Website](https://www.reactlive.nl/) - [Twitter](https://twitter.com/reactlivenl)
97+
98+
### React Conf Iran 2019 {#react-conf-iran-2019}
99+
August 29, 2019. Tehran, Iran.
100+
101+
[Website](https://reactconf.ir/) - [Videos](https://www.youtube.com/playlist?list=PL-VNqZFI5Nf-Nsj0rD3CWXGPkH-DI_0VY) - [Highlights](https://github.com/ReactConf/react-conf-highlights)
102+
98103
### React.js Conf 2015 {#reactjs-conf-2015}
99104
January 28 & 29 in Facebook HQ, CA
100105

content/community/tools-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ layout: community
55
permalink: community/debugging-tools.html
66
---
77

8-
* **[React Developer Tools](https://github.com/facebook/react-devtools):** an extension available for [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), [Firefox](https://addons.mozilla.org/firefox/addon/react-devtools/), and as a [standalone app](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools) that allows you to inspect the React component hierarchy in the Chrome Developer Tools.
8+
* **[React Developer Tools](https://github.com/facebook/react-devtools):** an extension available for [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), [Firefox](https://addons.mozilla.org/firefox/addon/react-devtools/), and as a [standalone app](https://github.com/facebook/react/tree/master/packages/react-devtools) that allows you to inspect the React component hierarchy in the Chrome Developer Tools.

content/community/tools-ui-components.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ permalink: community/ui-components.html
6060
* **[react-uwp](https://www.react-uwp.com)** A set of React Components that Implement Microsoft's UWP Design & Fluent Design..
6161
* **[react-validate-framework](https://github.com/MinJieLiu/react-validate-framework)**: A lightweight and extensible React validation component.
6262
* **[reactstrap](https://reactstrap.github.io/):** Simple Bootstrap 4 components built with [tether](http://tether.io/)
63+
* **[Reakit](https://reakit.io/):** Toolkit for building accessible rich web apps with React.
6364
* **[recharts](https://github.com/recharts/recharts)**: A composable charting library built on React components.
6465
* **[Selectivity](https://arendjr.github.io/selectivity/):** Modular and light-weight selection library.
6566
* **[Semantic-ui](https://react.semantic-ui.com/)**: The official Semantic-UI-React integration, Advanced components and declarative UI.

content/docs/code-splitting.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -124,37 +124,19 @@ The `React.lazy` function lets you render a dynamic import as a regular componen
124124

125125
```js
126126
import OtherComponent from './OtherComponent';
127-
128-
function MyComponent() {
129-
return (
130-
<div>
131-
<OtherComponent />
132-
</div>
133-
);
134-
}
135127
```
136128

137129
**After:**
138130

139131
```js
140132
const OtherComponent = React.lazy(() => import('./OtherComponent'));
141-
142-
function MyComponent() {
143-
return (
144-
<div>
145-
<OtherComponent />
146-
</div>
147-
);
148-
}
149133
```
150134

151-
This will automatically load the bundle containing the `OtherComponent` when this component gets rendered.
135+
This will automatically load the bundle containing the `OtherComponent` when this component is first rendered.
152136

153137
`React.lazy` takes a function that must call a dynamic `import()`. This must return a `Promise` which resolves to a module with a `default` export containing a React component.
154138

155-
### Suspense {#suspense}
156-
157-
If the module containing the `OtherComponent` is not yet loaded by the time `MyComponent` renders, we must show some fallback content while we're waiting for it to load - such as a loading indicator. This is done using the `Suspense` component.
139+
The lazy component should then be rendered inside a `Suspense` component, which allows us to show some fallback content (such as a loading indicator) while we're waiting for the lazy component to load.
158140

159141
```js
160142
const OtherComponent = React.lazy(() => import('./OtherComponent'));

content/docs/hooks-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ function ProductPage({ productId }) {
655655
return <ProductDetails fetchProduct={fetchProduct} />;
656656
}
657657
658-
function ProductDetails({ fetchProduct })
658+
function ProductDetails({ fetchProduct }) {
659659
useEffect(() => {
660660
fetchProduct();
661661
}, [fetchProduct]); // ✅ All useEffect dependencies are specified

content/docs/hooks-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Now the subscription will only be recreated when `props.source` changes.
165165
>
166166
>If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array (`[]`) as a second argument. This tells React that your effect doesn't depend on *any* values from props or state, so it never needs to re-run. This isn't handled as a special case -- it follows directly from how the dependencies array always works.
167167
>
168-
>If you pass an empty array (`[]`), the props and state as inside the effect will always have their initial values. While passing `[]` as the second argument is closer to the familiar `componentDidMount` and `componentWillUnmount` mental model, there are usually [better](/docs/hooks-faq.html#is-it-safe-to-omit-functions-from-the-list-of-dependencies) [solutions](/docs/hooks-faq.html#what-can-i-do-if-my-effect-dependencies-change-too-often) to avoid re-running effects too often. Also, don't forget that React defers running `useEffect` until after the browser has painted, so doing extra work is less of a problem.
168+
>If you pass an empty array (`[]`), the props and state inside the effect will always have their initial values. While passing `[]` as the second argument is closer to the familiar `componentDidMount` and `componentWillUnmount` mental model, there are usually [better](/docs/hooks-faq.html#is-it-safe-to-omit-functions-from-the-list-of-dependencies) [solutions](/docs/hooks-faq.html#what-can-i-do-if-my-effect-dependencies-change-too-often) to avoid re-running effects too often. Also, don't forget that React defers running `useEffect` until after the browser has painted, so doing extra work is less of a problem.
169169
>
170170
>
171171
>We recommend using the [`exhaustive-deps`](https://github.com/facebook/react/issues/14920) rule as part of our [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks#installation) package. It warns when dependencies are specified incorrectly and suggests a fix.

content/docs/optimizing-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Webpack v4+ will minify your code by default in production mode.
145145
const TerserPlugin = require('terser-webpack-plugin');
146146

147147
module.exports = {
148-
mode: 'production'
148+
mode: 'production',
149149
optimization: {
150150
minimizer: [new TerserPlugin({ /* additional options here */ })],
151151
},

content/docs/static-type-checking.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
id: static-type-checking
33
title: Static Type Checking
44
permalink: docs/static-type-checking.html
5-
prev: typechecking-with-proptypes.html
6-
next: refs-and-the-dom.html
75
---
86

97
Static type checkers like [Flow](https://flow.org/) and [TypeScript](https://www.typescriptlang.org/) identify certain types of problems before you even run your code. They can also improve developer workflow by adding features like auto-completion. For this reason, we recommend using Flow or TypeScript instead of `PropTypes` for larger code bases.

content/docs/testing-recipes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ You can use fake timers only in some tests. Above, we enabled them by calling `j
543543

544544
### Snapshot Testing {#snapshot-testing}
545545

546-
Frameworks like Jest also let you save "snapshots" of data with [`toMatchSnapshot` / `toMatchInlineSnapshot`](https://jestjs.io/docs/en/snapshot-testing). With these, we can "save" the renderered component output and ensure that a change to it has to be explicitly committed as a change to the snapshot.
546+
Frameworks like Jest also let you save "snapshots" of data with [`toMatchSnapshot` / `toMatchInlineSnapshot`](https://jestjs.io/docs/en/snapshot-testing). With these, we can "save" the rendered component output and ensure that a change to it has to be explicitly committed as a change to the snapshot.
547547

548548
In this example, we render a component and format the rendered HTML with the [`pretty`](https://www.npmjs.com/package/pretty) package, before saving it as an inline snapshot:
549549

content/docs/web-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ customElements.define('x-search', XSearch);
5959
>Note:
6060
>
6161
>This code **will not** work if you transform classes with Babel. See [this issue](https://github.com/w3c/webcomponents/issues/587) for the discussion.
62-
>Include the [custom-elements-es5-adapter](https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs) before you load your web components to fix this issue.
62+
>Include the [custom-elements-es5-adapter](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#custom-elements-es5-adapterjs) before you load your web components to fix this issue.

content/footerNav.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ more:
2020
channels:
2121
title: Channels
2222
items:
23-
- title: Github
23+
- title: GitHub
2424
to: https://github.com/facebook/react
2525
external: true
2626
- title: Stack Overflow

content/tutorial/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ The React Devtools extension for [Chrome](https://chrome.google.com/webstore/det
335335

336336
The React DevTools let you check the props and the state of your React components.
337337

338-
After installing React DevTools, you can right-click on any element on the page, click "Inspect" to open the developer tools, and the React tab will appear as the last tab to the right.
338+
After installing React DevTools, you can right-click on any element on the page, click "Inspect" to open the developer tools, and the React tabs ("⚛️ Components" and "⚛️ Profiler") will appear as the last tabs to the right. Use "⚛️ Components" to inspect the component tree.
339339

340340
**However, note there are a few extra steps to get it working with CodePen:**
341341

0 commit comments

Comments
 (0)