Skip to content

Commit f808d0a

Browse files
authored
Merge pull request #175 from reactjs/sync-986381c5
Sync with reactjs.org @ 986381c
2 parents 9977e7c + 07b857c commit f808d0a

7 files changed

+27
-7
lines changed

content/blog/2019-02-23-is-react-translated-yet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In the past, React community members have created unofficial translations for [C
2323

2424
If you would like to help out on a current translation, check out the [Languages](/languages) page and click on the "Contribute" link for your language.
2525

26-
Can't find your language? If you'd like to maintain your langauge's translation fork, follow the instructions in the [translation repo](https://github.com/reactjs/reactjs.org-translation#starting-a-new-translation)!
26+
Can't find your language? If you'd like to maintain your language's translation fork, follow the instructions in the [translation repo](https://github.com/reactjs/reactjs.org-translation#starting-a-new-translation)!
2727

2828
## Backstory {#backstory}
2929

content/community/conferences.md

+16
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ September 26-28, 2019 in Alicante, Spain
5252

5353
[Website](http://reactalicante.es/) - [Twitter](https://twitter.com/reactalicante) - [Facebook](https://www.facebook.com/ReactAlicante)
5454

55+
### React Conf 2019 {#react-conf-2019}
56+
October 24-25, 2019 in Henderson, Nevada USA
57+
58+
[Website](https://conf.reactjs.org/) - [Twitter](https://twitter.com/reactjs)
59+
5560
### React Advanced 2019 {#react-advanced-2019}
5661
October 25, 2019 in London, UK
5762

@@ -62,6 +67,16 @@ December 6, 2019 in Berlin, Germany
6267

6368
[Website](https://reactday.berlin) - [Twitter](https://twitter.com/reactdayberlin) - [Facebook](https://www.facebook.com/reactdayberlin/) - [Videos](https://www.youtube.com/reactdayberlin)
6469

70+
### ReactConf AU 2020 {#reactconfau}
71+
February 27 & 28, 2020 in Sydney, Australia
72+
73+
[Website](https://reactconfau.com/) - [Twitter](https://twitter.com/reactconfau) - [Facebook](https://www.facebook.com/reactconfau) - [Instagram](https://www.instagram.com/reactconfau/)
74+
75+
### Render-Atlanta 2020 {#render-atlanta-2020}
76+
May 4-6, 2020. Atlanta, GA, USA.
77+
78+
[Website](https://renderatl.com)
79+
6580
## Past Conferences {#past-conferences}
6681

6782
### React.js Conf 2015 {#reactjs-conf-2015}
@@ -395,3 +410,4 @@ June 21, 2019 Chicago, Illinois USA
395410
July 11-12, 2019. Portland, OR, USA.
396411

397412
[Website](https://infinite.red/ChainReactConf)
413+

content/docs/hooks-faq.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ Depending on your use case, there are a few more options described below.
567567
568568
Let's see why this matters.
569569

570-
If you specify a [list of dependencies](/docs/hooks-reference.html#conditionally-firing-an-effect) as the last argument to `useEffect`, `useMemo`, `useCallback`, or `useImperativeHandle`, it must include all values used inside that participate in the React data flow. That includes props, state, and anything derived from them.
570+
If you specify a [list of dependencies](/docs/hooks-reference.html#conditionally-firing-an-effect) as the last argument to `useEffect`, `useMemo`, `useCallback`, or `useImperativeHandle`, it must include all values used inside that participate in the React data flow. That includes props, state, and anything derived from them.
571571

572572
It is **only** safe to omit a function from the dependency list if nothing in it (or the functions called by it) references props, state, or values derived from them. This example has a bug:
573573

@@ -618,7 +618,7 @@ This also allows you to handle out-of-order responses with a local variable insi
618618
const json = await response.json();
619619
if (!ignore) setProduct(json);
620620
}
621-
621+
622622
fetchProduct();
623623
return () => { ignore = true };
624624
}, [productId]);
@@ -677,7 +677,7 @@ function Counter() {
677677

678678
The empty set of dependencies, `[]`, means that the effect will only run once when the component mounts, and not on every re-render. The problem is that inside the `setInterval` callback, the value of `count` does not change, because we've created a closure with the value of `count` set to `0` as it was when the effect callback ran. Every second, this callback then calls `setCount(0 + 1)`, so the count never goes above 1.
679679

680-
Specifying `[count]` as a list of dependencies would fix the bug, but would cause the interval to be reset on every change. Effectively, each `setInterval` would get one chance to execute before being cleared (similar to a `setTimout`.) That may not be desirable. To fix this, we can use the [functional update form of `setState`](/docs/hooks-reference.html#functional-updates). It lets us specify *how* the state needs to change without referencing the *current* state:
680+
Specifying `[count]` as a list of dependencies would fix the bug, but would cause the interval to be reset on every change. Effectively, each `setInterval` would get one chance to execute before being cleared (similar to a `setTimeout`.) That may not be desirable. To fix this, we can use the [functional update form of `setState`](/docs/hooks-reference.html#functional-updates). It lets us specify *how* the state needs to change without referencing the *current* state:
681681

682682
```js{6,9}
683683
function Counter() {

content/docs/state-and-lifecycle.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Il metodo `componentDidMount()` viene eseguito dopo che l'output del componente
244244
}
245245
```
246246

247-
Nota come salviamo l'ID del timer direttamente in `this`.
247+
Nota come salviamo l'ID del timer direttamente in `this` (`this.timerID`).
248248

249249
Mentre `this.props` viene impostato da React stesso e `this.state` ha un significato speciale, sei libero di aggiungere altri campi alla classe se hai bisogno di salvare qualcosa che non partecipa al flusso dei dati (come l'ID di un timer).
250250

content/docs/thinking-in-react.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ Fai riferimento alla [Documentazione](/docs/) se hai bisogno di aiuto nell'esecu
7575

7676
### Un Breve Intervallo: Props vs State {#a-brief-interlude-props-vs-state}
7777

78-
Esistono due tipi di "modello" dati in React: props e state. È importante capire la distinzione tra le due cose; sfoglia [la documentazione ufficiale di React](/docs/interactivity-and-dynamic-uis.html) nel caso avessi dubbi.
78+
Esistono due tipi di "modello" dati in React: props e state. È importante capire la distinzione tra le due cose; sfoglia [la documentazione ufficiale di React](/docs/state-and-lifecycle.html) nel caso avessi dubbi.
79+
Puoi leggere inoltre [FAQ: What is the difference between state and props?](/docs/faq-state.html#what-is-the-difference-between-state-and-props)
7980

8081
## Passo 3: Identifica la Minima (ma completa) Rappresentazione dello Stato della UI {#step-3-identify-the-minimal-but-complete-representation-of-ui-state}
8182

content/docs/typechecking-with-proptypes.md

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ MyComponent.propTypes = {
5757
// A React element.
5858
optionalElement: PropTypes.element,
5959

60+
// A React element type (ie. MyComponent).
61+
optionalElementType: PropTypes.elementType,
62+
6063
// You can also declare that a prop is an instance of a class. This uses
6164
// JS's instanceof operator.
6265
optionalMessage: PropTypes.instanceOf(Message),

content/languages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- name: Arabic
1111
translated_name: العربية
1212
code: ar
13-
status: 0
13+
status: 1
1414
- name: Azerbaijani
1515
translated_name: Azərbaycanca
1616
code: az

0 commit comments

Comments
 (0)