Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3413c78
Add React India 2020 to Upcoming Conferences (#2659)
apherio Jan 6, 2020
24ebabd
Update "Refs and the DOM" documentation (#2657)
evrimfeyyaz Jan 7, 2020
1e4159d
Fix sample test code (#2648)
numb86 Jan 7, 2020
5c66375
Move 2019 conferences to Past Conferences list (#2664)
benhodgson87 Jan 7, 2020
dedacfb
Updated URL to react performance article (#2670)
benschwarz Jan 12, 2020
99a1828
Update testing-environments.md (#2665)
ElRatonDeFuego Jan 12, 2020
3f64033
Fix grammar (#2676)
rasmustnilsson Jan 14, 2020
aa8f663
Change `very visible` to `noticeably` (#2679)
cpojer Jan 15, 2020
d7e9a52
Updated strict-mode docs to use `UNSAFE_*` lifecycle method names (#2…
dangreenisrael Jan 16, 2020
2f7be1e
Update conferences.md (#2671)
Leko Jan 16, 2020
205380c
Add React La Conferencia into conferences.md (#2678)
Darking360 Jan 16, 2020
159ac03
update conferences.md - add react day bangalore to the list (#2681)
kamleshchandnani Jan 16, 2020
7ab8394
Add meetup for Kuala Lumpur, Malaysia (#2689)
malcolm-kee Jan 18, 2020
c8aef5d
Got this warning when using the former version (#2693)
yoeldovidcohen Jan 20, 2020
a79f911
Update docs on how to contribute (#2696)
necolas Jan 21, 2020
7cb9511
Adding Cleveland React meetup (#2697)
danieltott Jan 23, 2020
335d643
Update external-resources.md (#2698)
andr1o Jan 23, 2020
948d681
merging all conflicts
reactjs-translation-bot Jan 27, 2020
4893f71
Update hooks-reference.md
lex111 Feb 1, 2020
b55a3d8
Update how-to-contribute.md
lex111 Feb 1, 2020
1513168
Update how-to-contribute.md
lex111 Feb 1, 2020
50c9b21
Update optimizing-performance.md
lex111 Feb 1, 2020
6855b13
Update refs-and-the-dom.md
lex111 Feb 1, 2020
f19512f
Update strict-mode.md
lex111 Feb 1, 2020
644c1fc
Update testing-environments.md
lex111 Feb 1, 2020
4d8b466
Update refs-and-the-dom.md
lex111 Feb 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### React Summit 2019 {#reactsummit2019}
November 30, 2019 in Lagos, Nigeria

[Website](https://reactsummit2019.splashthat.com) -[Twitter](https://twitter.com/react_summit)

### React Day Berlin 2019 {#react-day-berlin-2019}
December 6, 2019 in Berlin, Germany

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

### React Barcamp Cologne 2020 {#react-barcamp-cologne-2020}
February 1-2, 2020 in Cologne, Germany

Expand All @@ -32,6 +22,11 @@ February 27 & 28, 2020 in Sydney, Australia

[Website](https://reactconfau.com/) - [Twitter](https://twitter.com/reactconfau) - [Facebook](https://www.facebook.com/reactconfau) - [Instagram](https://www.instagram.com/reactconfau/)

### ReactConf Japan 2020 {#reactconfjp-2020}
March 21, 2020 in Tokyo, Japan

[Website](https://reactconf.jp/) - [Twitter](https://twitter.com/reactjapanconf)

### Reactathon 2020 {#reactathon-2020}
March 30 - 31, 2020 in San Francisco, CA

Expand All @@ -50,7 +45,7 @@ April 23 - 24, 2020 in Kraków, Poland
### React Day Bangalore 2020 {#react-day-bangalore-2020}
April 25, 2020 in Bangalore, India

[Website](https://reactday.in) - [Twitter](https://twitter.com/ReactDayIn)
[Website](https://reactday.in) - [Twitter](https://twitter.com/ReactDayIn) - [LinkedIn](https://www.linkedin.com/company/react-day/)

### render(ATL) 2020 {#render-atlanta-2020}
May 4-6, 2020. Atlanta, GA, USA.
Expand Down Expand Up @@ -82,11 +77,20 @@ July 17, 2020. New York City, USA.

[Website](https://reactweek.nyc/) - [Twitter](https://twitter.com/reactweek) - [Facebook](https://www.facebook.com/reactweek)

### React La Conferencia 2020 {#react-la-conferencia-2020}
July 18, 2020. Medellín, Colombia.

[Website](https://reactlaconf.co/) - [Twitter](https://twitter.com/reactlaconf)

### ComponentsConf 2020 {#components20}
September 1, 2020 in Melbourne, Australia

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

### React India 2020 {#react-india-2020}
November 6, 2020 in Mumbai, India

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

## Past Conferences {#past-conferences}

Expand Down Expand Up @@ -481,3 +485,14 @@ October 25, 2019 in London, UK
October 19, 2019 in São Paulo, BR

[Website](https://reactconf.com.br/) - [Twitter](https://twitter.com/reactconfbr) - [Facebook](https://www.facebook.com/ReactAdvanced) - [Slack](https://react.now.sh/)

### React Summit 2019 {#reactsummit2019}
November 30, 2019 in Lagos, Nigeria

[Website](https://reactsummit2019.splashthat.com) -[Twitter](https://twitter.com/react_summit)

### React Day Berlin 2019 {#react-day-berlin-2019}
December 6, 2019 in Berlin, Germany

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

2 changes: 1 addition & 1 deletion content/community/external-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ There are many wonderful curated resources the React community has put together.

- [Awesome React Talks](https://github.com/tiaanduplessis/awesome-react-talks) - A curated list of React talks.

- [Hero35 React Hub](https://hero35.com/stack/react) - A website with _all_ React conferences and talks, categorized & curated.
- [Hero35 React Hub](https://hero35.com/topic/react) - A website with _all_ React conferences and talks, categorized & curated.
2 changes: 2 additions & 0 deletions content/community/meetups.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
* [Tel Aviv](https://www.meetup.com/ReactJS-Israel/)

## Malaysia {#malaysia}
* [Kuala Lumpur](https://www.kl-react.com/)
* [Penang](https://www.facebook.com/groups/reactpenang/)

## Netherlands {#netherlands}
Expand Down Expand Up @@ -151,6 +152,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
* [Charlotte, NC - ReactJS](https://www.meetup.com/ReactJS-Charlotte/)
* [Charlotte, NC - React Native](https://www.meetup.com/cltreactnative/)
* [Chicago, IL - ReactJS](https://www.meetup.com/React-Chicago/)
* [Cleveland, OH - ReactJS](https://www.meetup.com/Cleveland-React/)
* [Columbus, OH - ReactJS](https://www.meetup.com/ReactJS-Columbus-meetup/)
* [Dallas, TX - ReactJS](https://www.meetup.com/ReactDallas/)
* [Detroit, MI - Detroit React User Group](https://www.meetup.com/Detroit-React-User-Group/)
Expand Down
2 changes: 1 addition & 1 deletion content/docs/concurrent-mode-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ function ProfileTimeline({ isStale, resource }) {

The tradeoff we're making here is that `<ProfileTimeline>` will be inconsistent with other components and potentially show an older item. Click "Next" a few times, and you'll notice it. But thanks to that, we were able to cut down the transition time from 1000ms to 300ms.

Whether or not it's an appropriate tradeoff depends on the situation. But it's a handy tool, especially when the content doesn't change very visible between items, and the user might not even realize they were looking at a stale version for a second.
Whether or not it's an appropriate tradeoff depends on the situation. But it's a handy tool, especially when the content doesn't change noticeably between items, and the user might not even realize they were looking at a stale version for a second.

It's worth noting that `useDeferredValue` is not *only* useful for data fetching. It also helps when an expensive component tree causes an interaction (e.g. typing in an input) to be sluggish. Just like we can "defer" a value that takes too long to fetch (and show its old value despite others components updating), we can do this with trees that take too long to render.

Expand Down
14 changes: 1 addition & 13 deletions content/docs/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ React использует [семантическое версионирова
### Что нужно для разработки? {#contribution-prerequisites}

* У вас на компьютере должны быть установлены [Node.js](https://nodejs.org) версии 8.0.0 или выше и [Yarn](https://yarnpkg.com/en/) 1.2.0 или выше.
* У вас установлен [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html).
* Некоторые зависимости React нужно компилировать. Для этого вам необходимо установить `gcc`. Если у вас OS X, то Xcode Command Line Tools справятся с этой задачей. В Ubuntu команда `apt-get install build-essential` установит все необходимые пакеты. В других Linux-дистрибутивах установка выполняется с помощью аналогичных команд. Для Windows последовательность действий описана в [инструкции по установке `node-gyp`](https://github.com/nodejs/node-gyp#installation).
* Знание git.

Expand Down Expand Up @@ -156,19 +157,6 @@ yarn link react react-dom

Линтер не может выловить все проблемы в оформлении кода. Если вы в чём-то сомневаетесь, поищите ответ в [Airbnb's Style Guide](https://github.com/airbnb/javascript).

### Видео о процессе разработки React {#introductory-video}

Посмотрите [этот небольшой видеоролик](https://www.youtube.com/watch?v=wUpPsEcGsg8) (26 минут), в котором показан весь процесс разработки React.

#### Главные темы: {#video-highlights}
- [4:12](https://youtu.be/wUpPsEcGsg8?t=4m12s) — сборка и тестирование React
- [6:07](https://youtu.be/wUpPsEcGsg8?t=6m7s) — создание и отправка пулреквестов
- [8:25](https://youtu.be/wUpPsEcGsg8?t=8m25s) — структура проекта
- [14:43](https://youtu.be/wUpPsEcGsg8?t=14m43s) — работа с npm-зависимостями React
- [19:15](https://youtu.be/wUpPsEcGsg8?t=19m15s) — добавление новой функциональности

Вот ещё одно видео с [выступлением на митапе ReactNYC](https://www.youtube.com/watch?v=GWCcZ6fnpn4). В нём Шон Вонг (Shawn Wang) рассказывает о своём опыте работы над React.

### Рабочее предложение (Request for Comments, RFC) {#request-for-comments-rfc}

Большинство изменений, включая исправления багов и улучшение документации, обычно предлагаются и реализуются с помощью простых пулреквестов на GitHub.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/optimizing-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ module.exports = {

6. События React будут сгруппированы под меткой **User Timing**.

Для более детального ознакомления, посмотрите [эту статью от Бена Шварца (Ben Schwarz)](https://building.calibreapp.com/debugging-react-performance-with-react-16-and-chrome-devtools-c90698a522ad).
Для более детального ознакомления, посмотрите [эту статью от Бена Шварца (Ben Schwarz)](https://calibreapp.com/blog/react-performance-profiling-optimization).

Обратите внимание, что **результаты являются относительными и в продакшене рендеринг компонентов будет быстрее**. Всё же это должно помочь вам понять, когда не имеющий отношения пользовательский компонент обновляется по ошибке, а также как глубоко и часто обновляется пользовательский интерфейс.

Expand Down
4 changes: 2 additions & 2 deletions content/docs/refs-and-the-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class CustomTextInput extends React.Component {

#### Рефы и функциональные компоненты {#refs-and-function-components}

**Нельзя использовать атрибут `ref` с функциональными компонентами**, потому что для них не создаётся экземпляров:
По умолчанию **нельзя использовать атрибут `ref` с функциональными компонентами**, потому что для них не создаётся экземпляров:

```javascript{1,8,13}
function MyFunctionComponent() {
Expand All @@ -161,7 +161,7 @@ class Parent extends React.Component {
}
```

Если вам нужен реф на функциональный компонент, превратите его в классовый, точно так же, как если бы вам нужно было использовать состояние или методы жизненного цикла компонента.
Если вам нужен реф на функциональный компонент, можете воспользоваться [`forwardRef`](https://reactjs.org/docs/forwarding-refs.html) (возможно вместе с [`useImperativeHandle`](/docs/hooks-reference.html#useimperativehandle)), либо превратить его в классовый компонент.

Тем не менее, можно **использовать атрибут `ref` внутри функционального компонента** при условии, что он ссылается на DOM-элемент или классовый компонент:

Expand Down
2 changes: 1 addition & 1 deletion content/docs/static-type-checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Create React App поддерживает TypeScript по умолчанию.
Чтобы создать **новый проект** с поддержкой TypeScript, используйте следующую команду:

```bash
npx create-react-app my-app --typescript
npx create-react-app my-app --template typescript
```

Можно добавить поддержку TypeScript в **уже существующий проект**, [как показано здесь](https://facebook.github.io/create-react-app/docs/adding-typescript).
Expand Down
6 changes: 3 additions & 3 deletions content/docs/strict-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ React работает в два этапа:

Этап рендеринга включает в себя следующие методы жизненного цикла:
* `constructor`
* `componentWillMount`
* `componentWillReceiveProps`
* `componentWillUpdate`
* `componentWillMount` (или `UNSAFE_componentWillMount`)
* `componentWillReceiveProps` (или `UNSAFE_componentWillReceiveProps`)
* `componentWillUpdate` (или `UNSAFE_componentWillUpdate`)
* `getDerivedStateFromProps`
* `shouldComponentUpdate`
* `render`
Expand Down
4 changes: 2 additions & 2 deletions content/docs/testing-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,14 @@ it("changes value when clicked", () => {

// получаем элемент button и кликаем на него несколько раз
const button = document.querySelector("[data-testid=toggle]");
expect(button.innerHTML).toBe("Turn off");
expect(button.innerHTML).toBe("Turn on");

act(() => {
button.dispatchEvent(new MouseEvent("click", { bubbles: true }));
});

expect(onChange).toHaveBeenCalledTimes(1);
expect(button.innerHTML).toBe("Turn on");
expect(button.innerHTML).toBe("Turn off");

act(() => {
for (let i = 0; i < 5; i++) {
Expand Down