Skip to content

Commit 32c3d86

Browse files
Merge branch 'master' of https://github.com/reactjs/reactjs.org into sync-99a18287
2 parents 42dfac7 + 99a1828 commit 32c3d86

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

content/community/conferences.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +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 Summit 2019 {#reactsummit2019}
16-
November 30, 2019 in Lagos, Nigeria
17-
18-
[Website](https://reactsummit2019.splashthat.com) -[Twitter](https://twitter.com/react_summit)
19-
20-
### React Day Berlin 2019 {#react-day-berlin-2019}
21-
December 6, 2019 in Berlin, Germany
22-
23-
[Website](https://reactday.berlin) - [Twitter](https://twitter.com/reactdayberlin) - [Facebook](https://www.facebook.com/reactdayberlin/) - [Videos](https://www.youtube.com/reactdayberlin)
24-
2515
### React Barcamp Cologne 2020 {#react-barcamp-cologne-2020}
2616
February 1-2, 2020 in Cologne, Germany
2717

@@ -87,6 +77,10 @@ September 1, 2020 in Melbourne, Australia
8777

8878
[Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/ComponentsConf) - [Facebook](https://www.facebook.com/ComponentsConf/) - [LinkedIn](https://www.linkedin.com/company/componentsconf/) - [YouTube](https://www.youtube.com/ComponentsConf)
8979

80+
### React India 2020 {#react-india-2020}
81+
November 6, 2020 in Mumbai, India
82+
83+
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia/) - [LinkedIn](https://www.linkedin.com/showcase/14545585) - [YouTube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w/videos)
9084

9185
## Past Conferences {#past-conferences}
9286

@@ -481,3 +475,14 @@ October 25, 2019 in London, UK
481475
October 19, 2019 in São Paulo, BR
482476

483477
[Website](https://reactconf.com.br/) - [Twitter](https://twitter.com/reactconfbr) - [Facebook](https://www.facebook.com/ReactAdvanced) - [Slack](https://react.now.sh/)
478+
479+
### React Summit 2019 {#reactsummit2019}
480+
November 30, 2019 in Lagos, Nigeria
481+
482+
[Website](https://reactsummit2019.splashthat.com) -[Twitter](https://twitter.com/react_summit)
483+
484+
### React Day Berlin 2019 {#react-day-berlin-2019}
485+
December 6, 2019 in Berlin, Germany
486+
487+
[Website](https://reactday.berlin) - [Twitter](https://twitter.com/reactdayberlin) - [Facebook](https://www.facebook.com/reactdayberlin/) - [Videos](https://www.youtube.com/reactdayberlin)
488+

content/docs/optimizing-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ To do this in Chrome:
176176

177177
6. React events will be grouped under the **User Timing** label.
178178

179-
For a more detailed walkthrough, check out [this article by Ben Schwarz](https://building.calibreapp.com/debugging-react-performance-with-react-16-and-chrome-devtools-c90698a522ad).
179+
For a more detailed walkthrough, check out [this article by Ben Schwarz](https://calibreapp.com/blog/react-performance-profiling-optimization).
180180

181181
Note that **the numbers are relative so components will render faster in production**. Still, this should help you realize when unrelated UI gets updated by mistake, and how deep and how often your UI updates occur.
182182

content/docs/refs-and-the-dom.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CustomTextInput extends React.Component {
140140

141141
#### Refs and Function Components {#refs-and-function-components}
142142

143-
**You may not use the `ref` attribute on function components** because they don't have instances:
143+
By default, **you may not use the `ref` attribute on function components** because they don't have instances:
144144

145145
```javascript{1,8,13}
146146
function MyFunctionComponent() {
@@ -161,7 +161,7 @@ class Parent extends React.Component {
161161
}
162162
```
163163

164-
You should convert the component to a class if you need a ref to it, just like you do when you need lifecycle methods or state.
164+
If you want to allow people to take a `ref` to your function component, you can use [`forwardRef`](https://reactjs.org/docs/forwarding-refs.html) (possibly in conjunction with [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), or you can convert the component to a class.
165165

166166
You can, however, **use the `ref` attribute inside a function component** as long as you refer to a DOM element or a class component:
167167

content/docs/testing-environments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ Sometimes, you may not want to mock timers. For example, maybe you're testing an
5353

5454
### End-to-end tests {#end-to-end-tests-aka-e2e-tests}
5555

56-
End-to-end tests are useful for testing longer workflows, especially when they're critical to your business (such as payments or signups). For these tests, you'd probably want to test both how a real browser renders the whole app, fetches data from the real API endpoints, uses sessions and cookies, navigates between different links. You might also likely want to make assertions not just on the DOM state, but on the backing data as well (e.g. to verify whether the updates have been persisted to the database).
56+
End-to-end tests are useful for testing longer workflows, especially when they're critical to your business (such as payments or signups). For these tests, you'd probably want to test how a real browser renders the whole app, fetches data from the real API endpoints, uses sessions and cookies, navigates between different links. You might also likely want to make assertions not just on the DOM state, but on the backing data as well (e.g. to verify whether the updates have been persisted to the database).
5757

5858
In this scenario, you would use a framework like [Cypress](https://www.cypress.io/) or a library like [puppeteer](https://github.com/GoogleChrome/puppeteer) so you can navigate between multiple routes and assert on side effects not just in the browser, but potentially on the backend as well.

content/docs/testing-recipes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,14 @@ it("changes value when clicked", () => {
396396
397397
// get ahold of the button element, and trigger some clicks on it
398398
const button = document.querySelector("[data-testid=toggle]");
399-
expect(button.innerHTML).toBe("Turn off");
399+
expect(button.innerHTML).toBe("Turn on");
400400
401401
act(() => {
402402
button.dispatchEvent(new MouseEvent("click", { bubbles: true }));
403403
});
404404
405405
expect(onChange).toHaveBeenCalledTimes(1);
406-
expect(button.innerHTML).toBe("Turn on");
406+
expect(button.innerHTML).toBe("Turn off");
407407
408408
act(() => {
409409
for (let i = 0; i < 5; i++) {

0 commit comments

Comments
 (0)