Skip to content

Commit 999a82d

Browse files
authored
Merge branch 'master' into testing-recipes
2 parents 73c1116 + 9bbad54 commit 999a82d

36 files changed

+412
-279
lines changed

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,76 @@
11
# Code of Conduct
22

3-
Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
4-
Please read the [full text](https://code.fb.com/codeofconduct/)
5-
so that you can understand what actions will and will not be tolerated.
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <opensource-conduct@fb.com>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

content/blog/2017-07-26-error-handling-in-react-16.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ Error boundaries preserve the declarative nature of React, and behave as you wou
111111

112112
React 15 included a very limited support for error boundaries under a different method name: `unstable_handleError`. This method no longer works, and you will need to change it to `componentDidCatch` in your code starting from the first 16 beta release.
113113

114-
For this change, we’ve provided [a codemod](https://github.com/reactjs/react-codemod#error-boundaries) to automatically migrate your code.
114+
For this change, we’ve provided a [codemod](https://github.com/reactjs/react-codemod#error-boundaries) to automatically migrate your code.

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: 40 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

@@ -67,6 +37,11 @@ October 25, 2019 in London, UK
6737

6838
[Website](https://reactadvanced.com) - [Twitter](http://twitter.com/reactadvanced) - [Facebook](https://www.facebook.com/ReactAdvanced) - [Videos](https://youtube.com/c/ReactConferences)
6939

40+
### React Conf Brasil 2019 {#react-conf-2019}
41+
October 19, 2019 in São Paulo, BR
42+
43+
[Website](https://reactconf.com.br/) - [Twitter](https://twitter.com/reactconfbr) - [Facebook](https://www.facebook.com/ReactAdvanced) - [Slack](https://react.now.sh/)
44+
7045
### React Day Berlin 2019 {#react-day-berlin-2019}
7146
December 6, 2019 in Berlin, Germany
7247

@@ -92,9 +67,44 @@ June 15, 2020. Tel Aviv, Israel.
9267

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

70+
### React Week NY 2020 {#react-week-NY-2020}
71+
July 17, 2020. New York City, USA.
72+
73+
[Website](https://reactweek.nyc/) - [Twitter](https://twitter.com/reactweek) - [Facebook](https://www.facebook.com/reactweek)
74+
9575

9676
## Past Conferences {#past-conferences}
9777

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

content/community/examples.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ There are many example projects created by the React community. Feel free to add
2121
* **[Bitcoin Price Index](https://github.com/mrkjlchvz/bitcoin-price-index)** Simple bitcoin price index data from CoinDesk API.
2222
* **[Builder Book](https://github.com/builderbook/builderbook)** Open source web app to write and host documentation or sell books. Built with React, Material-UI, Next, Express, Mongoose, MongoDB.
2323
* **[GFonts Space](https://github.com/pankajladhar/GFontsSpace)** A space which allows user to play with Google fonts. Built with React, Redux and React-Router.
24+
* **[Course Learn Page](https://github.com/ulearnpro/ulearn)** Open Source LMS script in Laravel 5.8 and ReactJS 16.9
25+
* **[Speedy math](https://github.com/pankajladhar/speedy-math)** An application which allows kids to practice basic Mathematics i.e Addition, Subtraction, Multiply, Comparison. It is a PWA (Progressive web app) with offline support and install as App features.

content/community/meetups.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
2525
* [Joinville](https://www.meetup.com/pt-BR/React-Joinville/)
2626
* [Rio de Janeiro](https://www.meetup.com/pt-BR/React-Rio-de-Janeiro/)
2727
* [São Paulo](https://www.meetup.com/pt-BR/ReactJS-SP/)
28+
* [Vila Velha](https://www.meetup.com/pt-BR/React-ES/)
2829

2930
## Bolivia {#bolivia}
3031
* [Bolivia](https://www.meetup.com/ReactBolivia/)
@@ -58,7 +59,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
5859
* [Karlsruhe](https://www.meetup.com/react_ka/)
5960
* [Kiel](https://www.meetup.com/Kiel-React-Native-Meetup/)
6061
* [Munich](https://www.meetup.com/ReactJS-Meetup-Munich/)
61-
* [React Berlin](https://www.meetup.com/React-Berlin/)
62+
* [React Berlin](https://www.meetup.com/React-Open-Source/)
6263
* [React.JS Girls Berlin](https://www.meetup.com/ReactJS-Girls-Berlin/)
6364

6465
## Greece {#greece}
@@ -144,6 +145,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
144145
* [New York, NY - ReactJS](https://www.meetup.com/NYC-Javascript-React-Group/)
145146
* [New York, NY - React Ladies](https://www.meetup.com/React-Ladies/)
146147
* [New York, NY - React Native](https://www.meetup.com/React-Native-NYC/)
148+
* [New York, NY - useReactNYC](https://www.meetup.com/useReactNYC/)
147149
* [Palo Alto, CA - React Native](https://www.meetup.com/React-Native-Silicon-Valley/)
148150
* [Philadelphia, PA - ReactJS](https://www.meetup.com/RQ-React/)
149151
* [Phoenix, AZ - ReactJS](https://www.meetup.com/ReactJS-Phoenix/)

content/community/support.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ React has a community of millions of developers.
1212

1313
On this page we've listed some React-related communities that you can be a part of; see the other pages in this section for additional online and in-person learning materials.
1414

15+
Before participating in React's communities, [please read our Code of Conduct](https://github.com/facebook/react/blob/master/CODE_OF_CONDUCT.md). We have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) and we expect that all community members adhere to the guidelines within.
16+
1517
## Stack Overflow {#stack-overflow}
1618

1719
Stack Overflow is a popular forum to ask code-level questions or if you're stuck with a specific error. Read through the [existing questions](https://stackoverflow.com/questions/tagged/reactjs) tagged with **reactjs** or [ask your own](https://stackoverflow.com/questions/ask?tags=reactjs)!
@@ -24,7 +26,7 @@ Each community consists of many thousands of React users.
2426

2527
* [DEV's React community](https://dev.to/t/react)
2628
* [Hashnode's React community](https://hashnode.com/n/reactjs)
27-
* [Reactiflux online chat](https://discord.gg/0ZcbPKXt5bZjGY5n)
29+
* [Reactiflux online chat](https://discord.gg/reactiflux)
2830
* [Reddit's React community](https://www.reddit.com/r/reactjs/)
2931
* [Spectrum's React community](https://spectrum.chat/react)
3032

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: 2 additions & 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.
@@ -78,3 +79,4 @@ permalink: community/ui-components.html
7879
* **[jQWidgets React components](https://www.jqwidgets.com/react/)**: Enterprise Ready 70+ UI Components.
7980
* **[KendoReact](https://www.telerik.com/kendo-react-ui/)**: UI for React Developers.
8081
* **[Mobiscroll React UI Components](https://mobiscroll.com/react)** Mobile UI Controls for the Productive React Developer.
82+
* **[React UI Toolkit](https://react-ui-tools.com/)**: 115+ professionally maintainted UI components ranging from a robust grid to charts and more. Try for FREE and build React apps faster.

content/docs/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Semantyczny HTML jest podstawą dostępności aplikacji webowych. Wykorzystując
4545

4646
- [Dokumentacja elementów HTML na MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element)
4747

48-
Czasem łamiemy zasady semantycznego HTMl, kiedy dodajemy dodatkowy element `div` do naszego kodu JSX, aby uruchomić aplikację. Dzieje się tak zwłaszcza kiedy pracujemy z listami (`<ol>`, `<ul>` czy `<dl>`) oraz tabelami `<table>`.
48+
Czasem łamiemy zasady semantycznego HTML, kiedy dodajemy dodatkowy element `div` do naszego kodu JSX, aby uruchomić aplikację. Dzieje się tak zwłaszcza kiedy pracujemy z listami (`<ol>`, `<ul>` czy `<dl>`) oraz tabelami `<table>`.
4949
W takim przypadkach powinniśmy korzystać z [fragmentów reactowych](/docs/fragments.html), które pozwalają na grupowanie elementów.
5050

5151
Przykład:

content/docs/code-splitting.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,41 +126,21 @@ Funkcja `React.lazy` pozwala renderować dynamicznie importowane komponenty jak
126126

127127
```js
128128
import OtherComponent from './OtherComponent';
129-
130-
function MyComponent() {
131-
return (
132-
<div>
133-
<OtherComponent />
134-
</div>
135-
);
136-
}
137129
```
138130

139131
**Po:**
140132

141133
```js
142134
const OtherComponent = React.lazy(() => import('./OtherComponent'));
143-
144-
function MyComponent() {
145-
return (
146-
<div>
147-
<OtherComponent />
148-
</div>
149-
);
150-
}
151135
```
152136

153-
Powyższy kod automatycznie załaduje paczkę zawierającą `OtherComponent` podczas renderowania komponentu.
137+
Powyższy kod automatycznie załaduje paczkę zawierającą `OtherComponent` podczas pierwszego renderowania komponentu.
154138

155139
`React.lazy` jako argument przyjmuje funkcję, która wywołuje dynamiczny `import()`.
156140
Musi ona zwrócić obiekt (`Promise`) (pol. *obietnicę*), która rozwiązuje się do modułu z eksportem domyślnym (`default`) zawierającym
157141
komponent reactowy.
158142

159-
### Zawieszenie (ang. *Suspense*) {#suspense}
160-
161-
Jeśli moduł zawierający `OtherComponent` nie zostanie załadowany przed renderowaniem komponentu
162-
`MyComponent`, musimy wyświetlić alternatywną zawartość, dopóki trwa ładowanie - na przykład
163-
wskaźnik ładowania. Robimy to za pomocą komponentu `Suspense`.
143+
"Leniwy" komponent powinien zostać wyrenderowany wewnątrz `Suspense`, dzięki któremu na czas ładowania możemy wyświetlić komponent zastępczy (np. wskaźnik ładowania).
164144

165145
```js
166146
const OtherComponent = React.lazy(() => import('./OtherComponent'));

content/docs/codebase-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Its source code is located in [`packages/react-reconciler`](https://github.com/f
217217

218218
### Event System {#event-system}
219219

220-
React implements a synthetic event system which is agnostic of the renderers and works both with React DOM and React Native. Its source code is located in [`packages/events`](https://github.com/facebook/react/tree/master/packages/react-events).
220+
React implements a synthetic event system which is agnostic of the renderers and works both with React DOM and React Native. Its source code is located in [`packages/react-events`](https://github.com/facebook/react/tree/master/packages/react-events).
221221

222222
There is a [video with a deep code dive into it](https://www.youtube.com/watch?v=dRo_egw7tBc) (66 mins).
223223

content/docs/context.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ In a typical React application, data is passed top-down (parent to child) via pr
1515
- [Context.Provider](#contextprovider)
1616
- [Class.contextType](#classcontexttype)
1717
- [Context.Consumer](#contextconsumer)
18+
- [Context.displayName](#contextdisplayname)
1819
- [Examples](#examples)
1920
- [Dynamic Context](#dynamic-context)
2021
- [Updating Context from a Nested Component](#updating-context-from-a-nested-component)
@@ -196,6 +197,20 @@ Requires a [function as a child](/docs/render-props.html#using-props-other-than-
196197
>
197198
> For more information about the 'function as a child' pattern, see [render props](/docs/render-props.html).
198199
200+
### `Context.displayName` {#contextdisplayname}
201+
202+
Context object accepts a `displayName` string property. React DevTools uses this string to determine what to display for the context.
203+
204+
For example, the following component will appear as MyDisplayName in the DevTools:
205+
206+
```js{2}
207+
const MyContext = React.createContext(/* some value */);
208+
MyContext.displayName = 'MyDisplayName';
209+
210+
<MyContext.Provider> // "MyDisplayName.Provider" in DevTools
211+
<MyContext.Consumer> // "MyDisplayName.Consumer" in DevTools
212+
```
213+
199214
## Examples {#examples}
200215

201216
### Dynamic Context {#dynamic-context}

0 commit comments

Comments
 (0)