Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve conflicts eef56ffd #367

Merged
merged 33 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
92ad9c2
Update thinking-in-react.md (#2095)
EmmaB Jun 23, 2019
39f30d4
Update thinking-in-react.md (#2098)
EmmaB Jun 24, 2019
cb5a61c
Add missing function call to example (#2102)
ravron Jun 26, 2019
4d1197b
Add description of PropTypes.exact (#1581)
Vlad-UA Jun 29, 2019
1705c25
Improve grammar (#2106)
jsejcksn Jun 30, 2019
6a6b917
Fixed minor code-splitting.md typo (#1292)
mattfwood Jun 30, 2019
aa84270
Fixed broken link to discuss.react.org (#2107)
domclone Jun 30, 2019
7847d23
Update 2019-02-23-is-react-translated-yet.md (#2109)
aatain Jun 30, 2019
6fc8c43
Add Meetup (#2097)
Ayush-Rawal Jun 30, 2019
03260d7
[docs] Updated required node and npm versions to match CRA docs in 'd…
ZachMayer35 Jun 30, 2019
d71c6e3
Remove tooling support info in fragment docs (#2096)
Jun 30, 2019
76588f6
Correct the description of when gDSFP gets called (#2100)
cyan33 Jun 30, 2019
d47597f
Added free Scrimba React Tutorial (#2111)
Jul 1, 2019
c024001
Update Production Optimization docs to use terser (#2112)
Jul 1, 2019
18f662c
Update hooks-faq.md (#2113)
n3dst4 Jul 1, 2019
ed9d731
Update tutorial.md (#2115)
shashank2000 Jul 1, 2019
2dd6924
move past conferences to the bottom of the list (#2118)
azza85 Jul 3, 2019
06a029d
fix(Blog): Post title updated to correct word for yes word in spanish…
akanshgulati Jul 4, 2019
26d9c14
Revert "fix(Blog): Post title updated to correct word for yes word in…
carburo Jul 5, 2019
40e96a4
Add DevExtreme Reactive to the Components list (#2127)
MaximKudriavtsev Jul 6, 2019
b57265b
[Documentation] Fix: Update link to Chrome Accessibility Inspec… (#2134)
nataliemarleny Jul 9, 2019
06dd4cb
React Native added support for hooks in 0.59 (#2121)
gamingumar Jul 9, 2019
e1abbde
Add Kiel to the list of React Meetups (#2136)
dbanck Jul 9, 2019
4af9f2d
Reduce confusion about adding additional fields to .this (#2142)
mikkovedru Jul 11, 2019
b84fb3d
Added option for more cdns. (#2144)
praisedpk Jul 13, 2019
dc650ec
Update docs about an existence of .elementType (#2145)
lonyele Jul 13, 2019
a091165
Revert "Added option for more cdns. (#2144)" (#2146)
alexkrolick Jul 14, 2019
989460f
Add React Conf to list of community conferences (#2158)
jergason Jul 20, 2019
5dca78b
docs(hooks): fix typo (#2161)
neighborhood999 Jul 22, 2019
1d8e542
update the status of Arabic translation .. (#2157)
3imed-jaberi Jul 22, 2019
d00058b
Fixing typo in contributing section of the docs (#2166)
richardtaylordawson Jul 24, 2019
eef56ff
Add a relevant FAQ link in "Thinking In React" (#2170)
colinmorris Jul 25, 2019
7a07441
resolve conflicts eef56ffd
gcor Jul 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/blog/2018-03-27-update-on-async-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Here is an example of a component that uses the legacy `componentWillReceiveProp

Although the above code is not problematic in itself, the `componentWillReceiveProps` lifecycle is often mis-used in ways that _do_ present problems. Because of this, the method will be deprecated.

As of version 16.3, the recommended way to update `state` in response to `props` changes is with the new `static getDerivedStateFromProps` lifecycle. (That lifecycle is called when a component is created and each time it receives new props):
As of version 16.3, the recommended way to update `state` in response to `props` changes is with the new `static getDerivedStateFromProps` lifecycle. It is called when a component is created and each time it re-renders due to changes to props or state:
`embed:update-on-async-rendering/updating-state-from-props-after.js`

You may notice in the example above that `props.currentRow` is mirrored in state (as `state.lastRow`). This enables `getDerivedStateFromProps` to access the previous props value in the same way as is done in `componentWillReceiveProps`.
Expand Down
4 changes: 2 additions & 2 deletions content/blog/2019-02-23-is-react-translated-yet.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the past, React community members have created unofficial translations for [C

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.

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)!
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)!

## Backstory {#backstory}

Expand All @@ -39,7 +39,7 @@ This approach appealed to us for several reasons:
* It encouraged active maintainers for each repo to ensure quality.
* Contributors already understand GitHub as a platform and are motivated to contribute directly to the React organization.

We started of with an initial trial period of three languages: Spanish, Japanese, and Simplified Chinese. This allowed us to work out any kinks in our process and make sure future translations are set up for success. I wanted to give the translation teams freedom to choose whatever tools they felt comfortable with. The only requirement is a [checklist](https://github.com/reactjs/reactjs.org-translation/blob/master/PROGRESS.template.md) that outlines the order of importance for translating pages.
We started off with an initial trial period of three languages: Spanish, Japanese, and Simplified Chinese. This allowed us to work out any kinks in our process and make sure future translations are set up for success. I wanted to give the translation teams freedom to choose whatever tools they felt comfortable with. The only requirement is a [checklist](https://github.com/reactjs/reactjs.org-translation/blob/master/PROGRESS.template.md) that outlines the order of importance for translating pages.

After the trial period, we were ready to accept more languages. I created [a script](https://github.com/reactjs/reactjs.org-translation/blob/master/scripts/create.js) to automate the creation of the new language repo, and a site, [Is React Translated Yet?](https://isreacttranslatedyet.com), to track progress on the different translations. We started *10* new translations on our first day alone!

Expand Down
65 changes: 35 additions & 30 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### ReactEurope 2019 {#reacteurope-2019}
May 23-24, 2019 in Paris, France

[Website](https://www.react-europe.org) - [Twitter](https://twitter.com/ReactEurope) - [Facebook](https://www.facebook.com/ReactEurope) - [Videos](https://www.youtube.com/c/ReacteuropeOrgConf)

### React Conf Armenia 2019 {#react-conf-am-19}
May 25, 2019 in Yerevan, Armenia

[Website](https://reactconf.am/) - [Twitter](https://twitter.com/ReactConfAM) - [Facebook](https://www.facebook.com/reactconf.am/) - [YouTube](https://www.youtube.com/c/JavaScriptConferenceArmenia) - [CFP](http://bit.ly/speakReact)

### ReactNext 2019 {#react-next-2019}
June 11, 2019. Tel Aviv, Israel

[Website](https://react-next.com) - [Twitter](https://twitter.com/ReactNext) - [Videos](https://www.youtube.com/channel/UC3BT8hh3yTTYxbLQy_wbk2w)

### React Norway 2019 {#react-norway-2019}
June 12, 2019. Larvik, Norway

[Website](https://reactnorway.com) - [Twitter](https://twitter.com/ReactNorway)

### React Loop 2019 {#react-loop-2019}
June 21, 2019 Chicago, Illinois USA

[Website](https://reactloop.com) - [Twitter](https://twitter.com/ReactLoop)

### Chain React 2019 {#chain-react-2019}
July 11-12, 2019. Portland, OR, USA.

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

### React Rally 2019 {#react-rally-2019}
August 22-23, 2019. Salt Lake City, USA.

Expand Down Expand Up @@ -82,6 +52,11 @@ September 26-28, 2019 in Alicante, Spain

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

### React Conf 2019 {#react-conf-2019}
October 24-25, 2019 in Henderson, Nevada USA

[Website](https://conf.reactjs.org/) - [Twitter](https://twitter.com/reactjs)

### React Advanced 2019 {#react-advanced-2019}
October 25, 2019 in London, UK

Expand Down Expand Up @@ -395,3 +370,33 @@ May 3, 2019 in London, UK
May 11 in Sofia, Bulgaria

[Website](http://react-not-a-conf.com/) - [Twitter](https://twitter.com/reactnotaconf) - [Facebook](https://www.facebook.com/events/780891358936156)

### ReactEurope 2019 {#reacteurope-2019}
May 23-24, 2019 in Paris, France

[Website](https://www.react-europe.org) - [Twitter](https://twitter.com/ReactEurope) - [Facebook](https://www.facebook.com/ReactEurope) - [Videos](https://www.youtube.com/c/ReacteuropeOrgConf)

### React Conf Armenia 2019 {#react-conf-am-19}
May 25, 2019 in Yerevan, Armenia

[Website](https://reactconf.am/) - [Twitter](https://twitter.com/ReactConfAM) - [Facebook](https://www.facebook.com/reactconf.am/) - [YouTube](https://www.youtube.com/c/JavaScriptConferenceArmenia) - [CFP](http://bit.ly/speakReact)

### ReactNext 2019 {#react-next-2019}
June 11, 2019. Tel Aviv, Israel

[Website](https://react-next.com) - [Twitter](https://twitter.com/ReactNext) - [Videos](https://www.youtube.com/channel/UC3BT8hh3yTTYxbLQy_wbk2w)

### React Norway 2019 {#react-norway-2019}
June 12, 2019. Larvik, Norway

[Website](https://reactnorway.com) - [Twitter](https://twitter.com/ReactNorway)

### React Loop 2019 {#react-loop-2019}
June 21, 2019 Chicago, Illinois USA

[Website](https://reactloop.com) - [Twitter](https://twitter.com/ReactLoop)

### Chain React 2019 {#chain-react-2019}
July 11-12, 2019. Portland, OR, USA.

[Website](https://infinite.red/ChainReactConf)
2 changes: 2 additions & 0 deletions content/community/courses.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ permalink: community/courses.html

- [Free React Bootcamp](https://tylermcginnis.com/free-react-bootcamp/) - Recordings from three days of a free online React bootcamp.

- [Scrimba: Learn React for free](https://scrimba.com/g/glearnreact) - 48 hands-on video tutorials building react apps.

## Paid Courses {#paid-courses}

- [Egghead.io](https://egghead.io/browse/frameworks/react) - Short instructional videos on React and many other topics.
Expand Down
2 changes: 2 additions & 0 deletions content/community/meetups.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
* [Düsseldorf](https://www.meetup.com/de-DE/ReactJS-Meetup-Dusseldorf/)
* [Hamburg](https://www.meetup.com/Hamburg-React-js-Meetup/)
* [Karlsruhe](https://www.meetup.com/react_ka/)
* [Kiel](https://www.meetup.com/Kiel-React-Native-Meetup/)
* [Munich](https://www.meetup.com/ReactJS-Meetup-Munich/)
* [React Berlin](https://www.meetup.com/React-Berlin/)
* [React.JS Girls Berlin](https://www.meetup.com/ReactJS-Girls-Berlin/)
Expand All @@ -69,6 +70,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
* [Bangalore](https://www.meetup.com/ReactJS-Bangalore/)
* [Chennai](https://www.meetup.com/React-Chennai/)
* [Delhi NCR](https://www.meetup.com/React-Delhi-NCR/)
* [Jaipur](https://www.meetup.com/JaipurJS-Developer-Meetup/)

## Ireland {#ireland}
* [Dublin](https://www.meetup.com/ReactJS-Dublin/)
Expand Down
1 change: 1 addition & 0 deletions content/community/tools-ui-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ permalink: community/ui-components.html
## Fee Based Components {#fee-based-components}

* **[ag-Grid](https://www.ag-grid.com)** Advanced data grid / data table for React.
* **[DevExtreme Reactive](https://devexpress.github.io/devextreme-reactive/react/)** High-performance plugin-based Data Grid, Scheduler and Chart components for Bootstrap and Material Design.
* **[ExtReact components](https://www.sencha.com/products/extreact//)**: 115+ Ready-to-Use UI Components.
* **[Grapecity Wijmo UI Components for React](https://www.grapecity.com/en/react/)**: Expand your React UI options with Wijmo’s complete collection of JavaScript components.
* **[jQWidgets React components](https://www.jqwidgets.com/react/)**: Enterprise Ready 70+ UI Components.
Expand Down
4 changes: 1 addition & 3 deletions content/docs/code-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ import("./math").then(math => {

> Примечание:
>
> Возможности `React.lazy` и задержки (suspense) пока недоступны для рендеринга на стороне сервера.
> Если вам нужно разделение кода в серверном приложении, мы рекомендуем [Loadable Components](https://github.com/smooth-code/loadable-components).
> У них есть хорошее [руководство по разделению бандла](https://github.com/smooth-code/loadable-components/blob/master/packages/server/README.md) с серверным рендерингом.
> Возможности `React.lazy` и задержки (suspense) пока недоступны для рендеринга на стороне сервера. Если вам нужно разделение кода в серверном приложении, мы рекомендуем [Loadable Components](https://github.com/smooth-code/loadable-components). У них есть хорошее [руководство по разделению бандла](https://github.com/smooth-code/loadable-components/blob/master/packages/server/README.md) с серверным рендерингом.


Функция `React.lazy` позволяет рендерить динамический импорт как обычный компонент.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/create-a-new-react-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ next: cdn-links.html

[Create React App](https://github.com/facebookincubator/create-react-app) – удобная среда для **изучения React** и лучший способ начать создание **нового [одностраничного](/docs/glossary.html#single-page-application) приложения** на React.

Инструмент настраивает среду для использования новейших возможностей JavaScript, оптимизирует приложение для продакшена и обеспечивает комфорт во время разработки. Вам понадобятся Node.js не ниже версии 6 и npm не ниже версии 5.2 на вашем компьютере. Для создания проекта выполните команды:
Инструмент настраивает среду для использования новейших возможностей JavaScript, оптимизирует приложение для продакшена и обеспечивает комфорт во время разработки. Вам понадобятся Node.js не ниже версии 8.10 и npm не ниже версии 5.6 на вашем компьютере. Для создания проекта выполните команды:

```bash
npx create-react-app my-app
Expand Down
4 changes: 1 addition & 3 deletions content/docs/fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ render() {
}
```

Также существует [сокращённая запись](#short-syntax), однако не все популярные инструменты поддерживают её.
Также существует [сокращённая запись](#short-syntax).

## Мотивация {#motivation}

Expand Down Expand Up @@ -113,8 +113,6 @@ class Columns extends React.Component {

Можно использовать `<></>` так же, как используется любой другой элемент. Однако такая запись не поддерживает ключи или атрибуты.

Обратите внимание, что **[большинство инструментов ещё не поддерживают сокращённую запись](/blog/2017/11/28/react-v16.2.0-fragment-support.html#support-for-fragment-syntax)**, поэтому можно явно указывать `<React.Fragment>`, пока не появится поддержка.

### Фрагменты с ключами {#keyed-fragments}

Фрагменты, объявленные с помощью `<React.Fragment>`, могут иметь ключи. Например, их можно использовать при создании списка определений, преобразовав коллекцию в массив фрагментов.
Expand Down
7 changes: 5 additions & 2 deletions content/docs/hooks-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ prev: hooks-reference.html

Обратите внимание, что **хуки будут доступны, только если все React-пакеты версии 16.8.0 или выше**. Хуки не будут работать, если вы, например, забыли обновить React DOM.

Поддержка хуков в React Native добавится в следующем стабильном релизе.
React Native 0.59 и выше поддерживает хуки.

### Надо ли переписать все мои классовые компоненты? {#do-i-need-to-rewrite-all-my-class-components}

Expand Down Expand Up @@ -621,7 +621,6 @@ function ProductPage({ productId }) {
const json = await response.json();
if (!ignore) setProduct(json);
}

fetchProduct();
return () => { ignore = true };
}, [productId]);
Expand Down Expand Up @@ -678,6 +677,8 @@ function Counter() {
}
```

Пустой набор зависимостей `[]` означает, что эффект будет выполняться только один раз, когда компонент монтируется, а не при каждом повторном рендере. Проблема в том, что внутри обратного вызова `setInterval` значение `count` не изменяется, потому что мы создали замыкание со значением `count`, установленным в `0`, как это было при выполнении обратного вызова эффекта. Каждую секунду этот обратный вызов вызывает `setCount(0 + 1)`, поэтому счетчик никогда не превышает 1.

Если переписать список зависимостей как `[count]`, то баг будет устранён, но это приведёт к сбрасыванию интервала при каждом изменении. Такое поведение может быть нежелательно. Чтобы исправить это, мы можем применить [форму функционального обновления хука `setState`](/docs/hooks-reference.html#functional-updates), которая позволяет указать, *как* должно меняться состояние, не ссылаясь явно на *текущее* состояние:

```js{6,9}
Expand All @@ -697,6 +698,8 @@ function Counter() {

(Идентичность функции `setCount` гарантирована, поэтому её можно безопасно не включать в список зависимостей.)

Теперь обратный вызов `setInterval` выполняется один раз в секунду, но каждый раз, когда внутренний вызов `setCount` может использовать обновленное значение для `count` (называемое `c` в обратном вызове здесь.)

В более сложных случаях (например, когда одно состояние зависит от другого), попробуйте перенести логику обновления состояния из хука эффекта в хук [`useReducer`](/docs/hooks-reference.html#usereducer). [Эта статья](https://adamrackis.dev/state-and-use-reducer/) иллюстрирует пример того, как это сделать. **Идентичность функции `dispatch` из хука `useReducer` всегда стабильна** — даже если функция редюсера объявлена внутри компонента и считывает его пропсы.

В крайнем случае если вы хотите реализовать что-то наподобие `this` в классах, вы можете [использовать реф](/docs/hooks-faq.html#is-there-something-like-instance-variables), чтобы хранить в нём изменяемую переменную. Тогда можно писать и читать из него. Например:
Expand Down
3 changes: 1 addition & 2 deletions content/docs/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ React использует [семантическое версионирова
У Facebook есть [программа Bug Bounty](https://www.facebook.com/whitehat/) для сообщения о багах безопасности. Пожалуйста, не публикуйте ишью о таких проблемах в открытом доступе. Если вы обнаружили дыру в безопасности React, зайдите на [эту страницу](https://www.facebook.com/whitehat/) и следуйте инструкциям.

### Наши контакты {#how-to-get-in-touch}

* IRC: [#reactjs на freenode](https://webchat.freenode.net/?channels=reactjs)
* Форум: [discuss.reactjs.org](https://discuss.reactjs.org/)
* [Форум](https://reactjs.org/community/support.html#popular-discussion-forums)

Кроме этого есть [сообщество пользователей React на платформе чатов Discord](https://www.reactiflux.com/). Туда вы также можете обратиться за помощью.

Expand Down