Skip to content

Commit 16d0f18

Browse files
Merge branch 'master' into lifting-state-up
2 parents 0733bea + 93086d3 commit 16d0f18

File tree

118 files changed

+3955
-1650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3955
-1650
lines changed

Diff for: CODE_OF_CONDUCT.md

+74-3
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 <[email protected]>. 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

Diff for: TRANSLATION.md

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# reactjs.org magyar fordítási projekt
2+
3+
Ebben a repoban a hivatalos React dokumentáció magyar fordításán dolgozunk. A fordítás céljáról és egyéb részletekről olvasd el
4+
[ezt a blogbejegyzést](https://reactjs.org/blog/2019/02/23/is-react-translated-yet.html)
5+
és/vagy nézd meg [ezt a videót](https://youtu.be/lLE4Jqaek5k). Az egyes
6+
fordítási projektek állásáról az
7+
[isreacttranslatedyet.com](https://isreacttranslatedyet.com/) címen
8+
tájékozódhatsz.
9+
10+
Az eredeti (angol nyelvű) dokumentáció a [reactjs.org](https://reactjs.org)-on
11+
található, ami egy [Gatsby](https://www.gatsbyjs.org/)-vel készült statikus
12+
weboldal. Ebből lett forkolva ez a repo, ami majd a magyar változatot
13+
tartalmazza, mikor elkészült. Jelenleg a dokumentumok kb. fele még eredeti
14+
nyelvű.
15+
16+
## Fordítók
17+
18+
A fordítást @gergely-nagy és @balazsorban44 kezdték el, örömmel vesszük, ha
19+
csatlakozol. A projektről a
20+
[react-translations.slack.com](https://rt-slack-invite.herokuapp.com/) oldal
21+
#hu csatornáján is beszélgethetünk.
22+
23+
## Hozzájárulás
24+
25+
A fordítás menete a következező:
26+
27+
1. [Itt választasz](https://github.com/reactjs/hu.reactjs.org/issues/1) fordítandó anyagot és jelzed, hogy elkezdenéd a fordítását.
28+
1. Indítasz egy forkot, az angol szöveg helyére beírod a magyar fordítást.
29+
1. Amikor elkészült, küldesz egy PR-t a módosításodról
30+
31+
## Gyakori kifejezések
32+
33+
| English | Magyar |
34+
| --- | --- |
35+
| _technical and React-specific_ |
36+
| declarative | deklaratív |
37+
| component | komponens |
38+
| controlled components | kontrollált komponens |
39+
| uncontrolled components | kontrollálatlan komponens |
40+
| render | renderelés |
41+
| data | adat |
42+
| application | alkalmazás |
43+
| external plugins | külső bővítmények |
44+
| third party plugins | harmadik féltől származó bővítmények |
45+
| syntax | szintaxis |
46+
| embedding expressions | kifejezések beágyazása |
47+
| attributes | attributumok |
48+
| element | elem |
49+
| functional component | függvény komponens |
50+
| function component | függvény komponens |
51+
| class components | osztály komponensek |
52+
| composition | kompozíció |
53+
| inheritance | öröklődés |
54+
| lifecycle | életciklus |
55+
| handling events | esemény kezelés |
56+
| conditional Rendering | feltételes renderelés |
57+
| operator | operátor |
58+
| reuse | újrafelhasználás |
59+
| reusable | újrafelhasználható |
60+
| shallow rendering | sekély renderelés |
61+
| deprecated | elavult |
62+
| legacy | örökség / korábbi |
63+
| cross-cutting concerns | |
64+
| HOC | FRK |
65+
| higher-order-component | felsőbb rendű komponens |
66+
| reconciliation | |
67+
| state | állapot |
68+
| local state | helyi állapot |
69+
| derived state | származtatott állapot |
70+
| asserts (logikai kijelentés) | állít |
71+
| vendor prefix | |
72+
| fallback | |
73+
| breaking change | |
74+
| function signature | |
75+
| props / prop | propok / prop |
76+
| context | kontextus |
77+
| fragments | töredék |
78+
| portal | portál |
79+
| class | osztály |
80+
| tick | ketyegés |
81+
| bundle | köteg |
82+
| package | csomag |
83+
| consumer | |
84+
| provider | |
85+
| PropTypes | PropTípusok |
86+
| good/bad | jó/rossz |
87+
| mixins | mixinek |
88+
| web components | web komponensek |
89+
| wrapper | |
90+
| mutation | mutáció |
91+
| _General purpose_ |
92+
| tutorial | tutoriál |
93+
| tip | tipp |
94+
| note | megjegyzés |
95+
| example | példa |
96+
| reference | referencia |
97+
| for example | például |
98+
| importing | | import/importálás |
99+
| opt-in | opcionális |
100+
| section | szekció |
101+
| overview | áttekintés |
102+
| try it on CodePen | próbáld ki a CodePenen |
103+
| _No translation required_ |
104+
| DOM |
105+
| UI |
106+
| ref |
107+
| Web (use uppercase)|
108+
| Create React App |
109+
| polyfill |
110+
| React |
111+
| Fiber |
112+
| hook |
113+
| stateful |
114+
| stateless |
115+
| mock | |
116+
| callback |
117+
| Promise | |
118+
119+
## Hasznos források
120+
121+
1. [Angol-magyar informatikai szótár](https://www.tankonyvtar.hu/hu/tartalom/tkt/angol-magyar/index.html)
122+
2. [IT-Szótár](http://www.itszotar.hu/)

Diff for: content/blog/2015-09-02-new-react-developer-tools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It contains a handful of new features, including:
2020

2121
## Installation {#installation}
2222

23-
Download the new devtools from the [Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) and on [Mozilla Add-ons](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/) for Firefox. If you're developing using React, we highly recommend installing these devtools.
23+
Download the new devtools from the [Chrome Web Store](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) and on [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/) for Firefox. If you're developing using React, we highly recommend installing these devtools.
2424

2525
If you already have the Chrome extension installed, it should autoupdate within the next week. You can also head to `chrome://extensions` and click "Update extensions now" if you'd like to get the new version today. If you installed the devtools beta, please remove it and switch back to the version from the store to make sure you always get the latest updates and bug fixes.
2626

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

+1-1
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.

Diff for: content/blog/2018-11-27-react-16-roadmap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function App() {
175175
// provide Suspense integrations with similar APIs.
176176
```
177177

178-
There is no official documentation for how to fetch data with Suspense yet, but you can find some early information in [this talk](https://youtu.be/ByBPyMBTzM0?t=1312) and [this small demo](https://github.com/facebook/react/tree/master/fixtures/unstable-async/suspense). We'll write documentation for React Cache (and how to write your own Suspense-compatible library) closer to this React release, but if you're curious, you can find its very early source code [here](https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js).
178+
There is no official documentation for how to fetch data with Suspense yet, but you can find some early information in [this talk](https://youtu.be/ByBPyMBTzM0?t=1312) and [this small demo](https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md#suspense-toggle). We'll write documentation for React Cache (and how to write your own Suspense-compatible library) closer to this React release, but if you're curious, you can find its very early source code [here](https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js).
179179

180180
The low-level Suspense mechanism (suspending rendering and showing a fallback) is expected to be stable even in React 16.6. We've used it for code splitting in production for months. However, the higher-level APIs for data fetching are very unstable. React Cache is rapidly changing, and will change at least a few more times. There are some low-level APIs that are [missing](https://github.com/reactjs/rfcs/pull/89) for a good higher-level API to be possible. We don't recommend using React Cache anywhere except very early experiments. Note that React Cache itself isn't strictly tied to React releases, but the current alphas lack basic features as cache invalidation, and you'll run into a wall very soon. We expect to have something usable with this React release.
181181

Diff for: content/blog/2019-08-08-react-v16.9.0.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const userProfile = {
4848
};
4949
// This will now warn:
5050
<a href={userProfile.website}>Profile</a>
51-
````
51+
```
5252

5353
**In React 16.9,** this pattern continues to work, but it will log a warning. If you use `javascript:` URLs for logic, try to use React event handlers instead. (As a last resort, you can circumvent the protection with [`dangerouslySetInnerHTML`](/docs/dom-elements.html#dangerouslysetinnerhtml), but it is highly discouraged and often leads to security holes.)
5454

@@ -70,7 +70,6 @@ This pattern was almost never used in the wild, and supporting it causes React t
7070

7171
We don't expect most codebases to be affected by this.
7272

73-
7473
## New Features {#new-features}
7574

7675
### Async [`act()`](/docs/test-utils.html#act) for Testing {#async-act-for-testing}
@@ -89,7 +88,7 @@ An update to SomeComponent inside a test was not wrapped in act(...).
8988
await act(async () => {
9089
// ...
9190
});
92-
````
91+
```
9392

9493
This solves the remaining cases where you couldn't use `act()` before, such as when the state update was inside an asynchronous function. As a result, **you should be able to fix all the remaining `act()` warnings in your tests now.**
9594

@@ -209,12 +208,12 @@ Refer to the documentation for [detailed installation instructions](/docs/instal
209208

210209
### React {#react}
211210

212-
* Add `<React.Profiler>` API for gathering performance measurements programmatically. ([@bvaughn](https://github.com/bvaughn) in [#15172](https://github.com/facebook/react/pull/15172))
211+
* Add `<React.Profiler>` API for gathering performance measurements programmatically. ([@bvaughn](https://github.com/bvaughn) in [#15172](https://github.com/facebook/react/pull/15172))
213212
* Remove `unstable_ConcurrentMode` in favor of `unstable_createRoot`. ([@acdlite](https://github.com/acdlite) in [#15532](https://github.com/facebook/react/pull/15532))
214213

215-
### React DOM
214+
### React DOM {#react-dom}
216215

217-
* Deprecate old names for the `UNSAFE_*` lifecycle methods. ([@bvaughn](https://github.com/bvaughn) in [#15186](https://github.com/facebook/react/pull/15186) and [@threepointone](https://github.com/threepointone) in [#16103](https://github.com/facebook/react/pull/16103))
216+
* Deprecate old names for the `UNSAFE_*` lifecycle methods. ([@bvaughn](https://github.com/bvaughn) in [#15186](https://github.com/facebook/react/pull/15186) and [@threepointone](https://github.com/threepointone) in [#16103](https://github.com/facebook/react/pull/16103))
218217
* Deprecate `javascript:` URLs as a common attack surface. ([@sebmarkbage](https://github.com/sebmarkbage) in [#15047](https://github.com/facebook/react/pull/15047))
219218
* Deprecate uncommon "module pattern" (factory) components. ([@sebmarkbage](https://github.com/sebmarkbage) in [#15145](https://github.com/facebook/react/pull/15145))
220219
* Add support for the `disablePictureInPicture` attribute on `<video>`. ([@eek](https://github.com/eek) in [#15334](https://github.com/facebook/react/pull/15334))
@@ -229,13 +228,13 @@ Refer to the documentation for [detailed installation instructions](/docs/instal
229228
* Fix hiding Suspense fallback nodes when there is an `!important` style. ([@acdlite](https://github.com/acdlite) in [#15861](https://github.com/facebook/react/pull/15861) and [#15882](https://github.com/facebook/react/pull/15882))
230229
* Slightly improve hydration performance. ([@bmeurer](https://github.com/bmeurer) in [#15998](https://github.com/facebook/react/pull/15998))
231230

232-
### React DOM Server
231+
### React DOM Server {#react-dom-server}
233232

234-
* Fix incorrect output for camelCase custom CSS property names. ([@bedakb](https://github.com/bedakb) in [#16167](https://github.com/facebook/react/pull/16167))
233+
* Fix incorrect output for camelCase custom CSS property names. ([@bedakb](https://github.com/bedakb) in [#16167](https://github.com/facebook/react/pull/16167))
235234

236-
### React Test Utilities and Test Renderer
235+
### React Test Utilities and Test Renderer {#react-test-utilities-and-test-renderer}
237236

238-
* Add `act(async () => ...)` for testing asynchronous state updates. ([@threepointone](https://github.com/threepointone) in [#14853](https://github.com/facebook/react/pull/14853))
237+
* Add `act(async () => ...)` for testing asynchronous state updates. ([@threepointone](https://github.com/threepointone) in [#14853](https://github.com/facebook/react/pull/14853))
239238
* Add support for nesting `act` from different renderers. ([@threepointone](https://github.com/threepointone) in [#16039](https://github.com/facebook/react/pull/16039) and [#16042](https://github.com/facebook/react/pull/16042))
240239
* Warn in Strict Mode if effects are scheduled outside an `act()` call. ([@threepointone](https://github.com/threepointone) in [#15763](https://github.com/facebook/react/pull/15763) and [#16041](https://github.com/facebook/react/pull/16041))
241240
* Warn when using `act` from the wrong renderer. ([@threepointone](https://github.com/threepointone) in [#15756](https://github.com/facebook/react/pull/15756))

Diff for: content/blog/2019-08-15-new-react-devtools.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Introducing the New React DevTools"
3+
author: [bvaughn]
4+
---
5+
We are excited to announce a new release of the React Developer Tools, available today in Chrome, Firefox, and (Chromium) Edge!
6+
7+
## What's changed? {#whats-changed}
8+
9+
A lot has changed in version 4!
10+
At a high level, this new version should offer significant performance gains and an improved navigation experience.
11+
It also offers full support for React Hooks, including inspecting nested objects.
12+
13+
![DevTools version 4 screenshot](../images/blog/devtools-v4-screenshot.png)
14+
15+
[Visit the interactive tutorial](https://react-devtools-tutorial.now.sh/) to try out the new version or [see the changelog](https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md#400-august-15-2019) for demo videos and more details.
16+
17+
## Which versions of React are supported? {#which-versions-of-react-are-supported}
18+
19+
**`react-dom`**
20+
21+
* `0`-`14.x`: Not supported
22+
* `15.x`: Supported (except for the new component filters feature)
23+
* `16.x`: Supported
24+
25+
**`react-native`**
26+
* `0`-`0.61`: Not supported
27+
* `0.62`: Will be supported (when 0.62 is released)
28+
29+
## How do I get the new DevTools? {#how-do-i-get-the-new-devtools}
30+
31+
React DevTools is available as an extension for [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/).
32+
If you have already installed the extension, it should update automatically within the next couple of hours.
33+
34+
If you use the standalone shell (e.g. in React Native or Safari), you can install the new version [from NPM](https://www.npmjs.com/package/react-devtools):
35+
36+
```shell
37+
npm install -g react-devtools@^4
38+
```
39+
40+
## Where did all of the DOM elements go? {#where-did-all-of-the-dom-elements-go}
41+
42+
The new DevTools provides a way to filter components from the tree to make it easier to navigate deeply nested hierarchies.
43+
Host nodes (e.g. HTML `<div>`, React Native `<View>`) are *hidden by default*, but this filter can be disabled:
44+
45+
![DevTools component filters](../images/blog/devtools-component-filters.gif)
46+
47+
## How do I get the old version back? {#how-do-i-get-the-old-version-back}
48+
49+
If you are working with React Native version 60 (or older) you can install the previous release of DevTools from NPM:
50+
51+
```shell
52+
npm install --dev react-devtools@^3
53+
```
54+
55+
For older versions of React DOM (v0.14 or earlier) you will need to build the extension from source:
56+
57+
```shell
58+
# Checkout the extension source
59+
git clone https://github.com/facebook/react-devtools
60+
61+
cd react-devtools
62+
63+
# Checkout the previous release branch
64+
git checkout v3
65+
66+
# Install dependencies and build the unpacked extension
67+
yarn install
68+
yarn build:extension
69+
70+
# Follow the on-screen instructions to complete installation
71+
```
72+
73+
## Thank you! {#thank-you}
74+
75+
We'd like to thank everyone who tested the early release of DevTools version 4.
76+
Your feedback helped improve this initial release significantly.
77+
78+
We still have many exciting features planned and feedback is always welcome!
79+
Please feel free to open a [GitHub issue](https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools) or tag [@reactjs on Twitter](https://twitter.com/reactjs).

0 commit comments

Comments
 (0)