From 90fa54985fd1165bfa5d56b86c27253c96957b9c Mon Sep 17 00:00:00 2001
From: Ediiik
Date: Sat, 20 Jan 2018 23:29:21 +0100
Subject: [PATCH 001/118] Fix typo
---
content/docs/static-type-checking.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md
index 3436c4c43..910dab5ac 100644
--- a/content/docs/static-type-checking.md
+++ b/content/docs/static-type-checking.md
@@ -2,7 +2,7 @@
id: static-type-checking
title: Static Type Checking
permalink: docs/static-type-checking.html
-prev: typechecking-with-prototypes.html
+prev: typechecking-with-proptypes.html
next: refs-and-the-dom.html
---
From 984abd2539119819608590ef68042ee404b56276 Mon Sep 17 00:00:00 2001
From: Edouard Alvard
Date: Mon, 9 Jul 2018 16:34:33 +0200
Subject: [PATCH 002/118] Fix typo
---
content/tutorial/tutorial.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md
index 9a0523248..f09dda71c 100644
--- a/content/tutorial/tutorial.md
+++ b/content/tutorial/tutorial.md
@@ -215,7 +215,7 @@ Congratulations! You've just "passed a prop" from a parent Board component to a
### Making an Interactive Component
-Let's fill the Square component with an "X" when we click it.
+Let's fill the Square component with an "X" when we click it.
First, change the button tag that is returned from the Square component's `render()` function to this:
```javascript{4}
@@ -605,7 +605,7 @@ We have changed `this.props` to `props` both times it appears.
We now need to fix an obvious defect in our tic-tac-toe game: the "O"s cannot be marked on the board.
-We'll set the the first move to be "X" by default. We can set this default by modifying the initial state in our Board constructor:
+We'll set the first move to be "X" by default. We can set this default by modifying the initial state in our Board constructor:
```javascript{6}
class Board extends React.Component {
@@ -1003,7 +1003,7 @@ In JavaScript, arrays have a [`map()` method](https://developer.mozilla.org/en-U
```js
const numbers = [1, 2, 3];
const doubled = numbers.map(x => x * 2); // [2, 4, 6]
-```
+```
Using the `map` method, we can map our history of moves to React elements representing buttons on the screen, and display a list of buttons to "jump" to past moves.
From a8e5cc424f7d798b101584fa55bdb406ff213856 Mon Sep 17 00:00:00 2001
From: Leigh Halliday
Date: Thu, 25 Oct 2018 12:59:31 -0400
Subject: [PATCH 003/118] Fixing a small grammer mistake on the code-splitting
page
---
content/docs/code-splitting.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md
index 132fa99a4..091ea3dd8 100644
--- a/content/docs/code-splitting.md
+++ b/content/docs/code-splitting.md
@@ -117,7 +117,7 @@ parse the dynamic import syntax but is not transforming it. For that you will ne
>
> `React.lazy` and Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we still recommend [React Loadable](https://github.com/thejameskyle/react-loadable). It has a nice [guide for bundle splitting with server-side rendering](https://github.com/thejameskyle/react-loadable#------------server-side-rendering).
-The `React.lazy` function lets you render an dynamic import as a regular component.
+The `React.lazy` function lets you render a dynamic import as a regular component.
**Before:**
From a531a0f89d7d8f227db17cf4c68276f8a16ef5be Mon Sep 17 00:00:00 2001
From: Tushar Khatiwada
Date: Fri, 26 Oct 2018 15:31:58 +0545
Subject: [PATCH 004/118] Small typo fix
---
content/docs/hooks-faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md
index c57e200c0..cfd11da01 100644
--- a/content/docs/hooks-faq.md
+++ b/content/docs/hooks-faq.md
@@ -109,7 +109,7 @@ There are a few more heuristics, and they might change over time as we fine-tune
### How do lifecycle methods correspond to Hooks?
-* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing it is expensive, you can pass a function to `useState`.
+* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing is expensive, you can pass a function to `useState`.
* `getDerivedStateFromProps`: Schedule an update [while rendering](#how-do-i-implement-getderivedstatefromprops) instead.
From 451a96c311f145aea332d17585e5ec2425332474 Mon Sep 17 00:00:00 2001
From: Misha Moroshko
Date: Fri, 26 Oct 2018 16:18:29 -0700
Subject: [PATCH 005/118] Tip => Note
"Tip" usually contains an action for you to perform.
"Note" is more appropriate here since it's just an FYI.
---
content/docs/hooks-faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md
index ca01054c1..89c0da712 100644
--- a/content/docs/hooks-faq.md
+++ b/content/docs/hooks-faq.md
@@ -396,7 +396,7 @@ In large component trees, an alternative we recommend is to pass down a `dispatc
const TodosDispatch = React.createContext(null);
function TodosApp() {
- // Tip: `dispatch` won't change between re-renders
+ // Note: `dispatch` won't change between re-renders
const [todos, dispatch] = useReducer(todosReducer);
return (
From 7fd8a8dfd8b5ef639fac7f30cd4a014ae5e9dd43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9liton=20Nordt?=
Date: Sun, 28 Oct 2018 16:40:21 -0300
Subject: [PATCH 006/118] Fix typo in Hooks FAQ
---
content/docs/hooks-faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md
index ca01054c1..395a33baf 100644
--- a/content/docs/hooks-faq.md
+++ b/content/docs/hooks-faq.md
@@ -407,7 +407,7 @@ function TodosApp() {
}
```
-Any child in the tree inside `TodosApp` can read use the `dispatch` function to pass actions up to `TodosApp`:
+Any child in the tree inside `TodosApp` can use the `dispatch` function to pass actions up to `TodosApp`:
```js{2,3}
function DeepChild(props) {
From 9e9647c8a196b598477fa45357cd6a9ece6e482c Mon Sep 17 00:00:00 2001
From: Narin Luangrath
Date: Fri, 11 Jan 2019 11:03:04 -0800
Subject: [PATCH 007/118] Fix typo in profiler-readme
`aso` -> `also`
---
content/blog/2018-09-10-introducing-the-react-profiler.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/blog/2018-09-10-introducing-the-react-profiler.md b/content/blog/2018-09-10-introducing-the-react-profiler.md
index d73131fcb..47211d370 100644
--- a/content/blog/2018-09-10-introducing-the-react-profiler.md
+++ b/content/blog/2018-09-10-introducing-the-react-profiler.md
@@ -140,7 +140,7 @@ It also shows that each time it rendered, it was the most "expensive" component
To view this chart, either double-click on a component _or_ select a component and click on the blue bar chart icon in the right detail pane.
You can return to the previous chart by clicking the "x" button in the right detail pane.
-You can aso double click on a particular bar to view more information about that commit.
+You can also double click on a particular bar to view more information about that commit.
![How to view all renders for a specific component](../images/blog/introducing-the-react-profiler/see-all-commits-for-a-fiber.gif)
From b3d150358829e057fb6045aac73c238f883283b9 Mon Sep 17 00:00:00 2001
From: natusaspire
Date: Sun, 13 Jan 2019 00:30:23 +0200
Subject: [PATCH 008/118] fix typo in blog post
---
content/blog/2018-06-07-you-probably-dont-need-derived-state.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md
index 6e71ef838..9d3337c86 100644
--- a/content/blog/2018-06-07-you-probably-dont-need-derived-state.md
+++ b/content/blog/2018-06-07-you-probably-dont-need-derived-state.md
@@ -213,7 +213,7 @@ To recap, when designing a component, it is important to decide whether its data
Instead of trying to **"mirror" a prop value in state**, make the component **controlled**, and consolidate the two diverging values in the state of some parent component. For example, rather than a child accepting a "committed" `props.value` and tracking a "draft" `state.value`, have the parent manage both `state.draftValue` and `state.committedValue` and control the child's value directly. This makes the data flow more explicit and predictable.
For **uncontrolled** components, if you're trying to reset state when a particular prop (usually an ID) changes, you have a few options:
-* **Recomendation: To reset _all internal state_, use the `key` attribute.**
+* **Recommendation: To reset _all internal state_, use the `key` attribute.**
* Alternative 1: To reset _only certain state fields_, watch for changes in a special property (e.g. `props.userID`).
* Alternative 2: You can also consider fall back to an imperative instance method using refs.
From d8a83092174f4d7a4b6e4cf68fdd7bae54a0cb73 Mon Sep 17 00:00:00 2001
From: Prashant Andani
Date: Wed, 16 Jan 2019 21:18:03 +0530
Subject: [PATCH 009/118] Typo fix
---
content/blog/2013-06-27-community-roundup-3.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/blog/2013-06-27-community-roundup-3.md b/content/blog/2013-06-27-community-roundup-3.md
index 69041ea09..2d297f20f 100644
--- a/content/blog/2013-06-27-community-roundup-3.md
+++ b/content/blog/2013-06-27-community-roundup-3.md
@@ -49,7 +49,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
[Joel Burget](http://joelburget.com/) wrote a blog post talking about the way we would write React-like components in Backbone and Handlebars.
-> The problem here is that we're trying to maniplate a tree, but there's a textual layer we have to go through. Our views are represented as a tree - the subviews are children of CommentCollectionView - and they end up as part of a tree in the DOM. But there's a Handlebars layer in the middle (which deals in flat strings), so the hierarchy must be destructed and rebuilt when we render.
+> The problem here is that we're trying to manipulate a tree, but there's a textual layer we have to go through. Our views are represented as a tree - the subviews are children of CommentCollectionView - and they end up as part of a tree in the DOM. But there's a Handlebars layer in the middle (which deals in flat strings), so the hierarchy must be destructed and rebuilt when we render.
>
> What does it take to render a collection view? In the Backbone/Handlebars view of the world you have to render the template (with stubs), render each subview which replaces a stub, and keep a reference to each subview (or anything within the view that could change in the future).
>
From dfaa41deabada361a0f93c7f58a50931a8a33fd5 Mon Sep 17 00:00:00 2001
From: evolveris
Date: Sat, 19 Jan 2019 11:43:17 +0000
Subject: [PATCH 010/118] Fix typo
---
content/docs/strict-mode.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/strict-mode.md b/content/docs/strict-mode.md
index 09b3b9e5d..889490b5e 100644
--- a/content/docs/strict-mode.md
+++ b/content/docs/strict-mode.md
@@ -57,7 +57,7 @@ React used to support `findDOMNode` to search the tree for a DOM node given a cl
`findDOMNode` can also be used on class components but this was breaking abstraction levels by allowing a parent to demand that certain children was rendered. It creates a refactoring hazard where you can't change the implementation details of a component because a parent might be reaching into its DOM node. `findDOMNode` only returns the first child, but with the use of Fragments, it is possible for a component to render multiple DOM nodes. `findDOMNode` is a one time read API. It only gave you an answer when you asked for it. If a child component renders a different node, there is no way to handle this change. Therefore `findDOMNode` only worked if components always return a single DOM node that never changes.
-You can instead make this explicit by pass a ref to your custom component and pass that along to the DOM using [ref forwarding](/docs/forwarding-refs.html#forwarding-refs-to-dom-components).
+You can instead make this explicit by passing a ref to your custom component and pass that along to the DOM using [ref forwarding](/docs/forwarding-refs.html#forwarding-refs-to-dom-components).
You can also add a wrapper DOM node in your component and attach a ref directly to it.
From 573da866666f33d43b8617e5fd94d56de4eb0fd1 Mon Sep 17 00:00:00 2001
From: Prashant Andani
Date: Wed, 6 Feb 2019 22:46:24 +0530
Subject: [PATCH 011/118] Add https for javascript.info
---
content/docs/getting-started.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/getting-started.md b/content/docs/getting-started.md
index 8ad77b1ac..86e15c843 100644
--- a/content/docs/getting-started.md
+++ b/content/docs/getting-started.md
@@ -79,7 +79,7 @@ We recommend going through [this JavaScript overview](https://developer.mozilla.
>Tip
>
->Whenever you get confused by something in JavaScript, [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [javascript.info](http://javascript.info/) are great websites to check. There are also [community support forums](/community/support.html) where you can ask for help.
+>Whenever you get confused by something in JavaScript, [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [javascript.info](https://javascript.info/) are great websites to check. There are also [community support forums](/community/support.html) where you can ask for help.
### Practical Tutorial
From 4aa208e59dcd2322188c746c50c983ece65d8ad5 Mon Sep 17 00:00:00 2001
From: "adeel.imran"
Date: Thu, 7 Feb 2019 11:42:13 +0500
Subject: [PATCH 012/118] updated grammer
---
content/docs/hooks-reference.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md
index 6a8d8a664..752f53ef7 100644
--- a/content/docs/hooks-reference.md
+++ b/content/docs/hooks-reference.md
@@ -199,7 +199,7 @@ function reducer(state, action) {
}
}
-function Counter({initialCount}) {
+function Counter({initialState}) {
const [state, dispatch] = useReducer(reducer, initialState);
return (
<>
From 7e4ac52af4dc93b1d1b46cb39ead62b450e94b98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Thu, 7 Feb 2019 14:41:33 +0100
Subject: [PATCH 013/118] HTTPS-ify most insecure URLs in content/docs (& one
in Acknowledgments)
This is a followup to #1157
---
content/docs/accessibility.md | 38 +++++++++----------
content/docs/add-react-to-a-website.md | 4 +-
content/docs/addons-perf.md | 4 +-
content/docs/addons-shallow-renderer.md | 2 +-
content/docs/addons-test-utils.md | 4 +-
content/docs/addons-update.md | 4 +-
content/docs/code-splitting.md | 2 +-
content/docs/codebase-overview.md | 4 +-
content/docs/create-a-new-react-app.md | 6 +--
content/docs/design-principles.md | 6 +--
content/docs/faq-functions.md | 2 +-
content/docs/faq-state.md | 2 +-
content/docs/getting-started.md | 4 +-
content/docs/handling-events.md | 2 +-
content/docs/higher-order-components.md | 6 +--
content/docs/how-to-contribute.md | 4 +-
.../docs/integrating-with-other-libraries.md | 22 +++++------
content/docs/introducing-jsx.md | 6 +--
content/docs/reconciliation.md | 2 +-
content/docs/reference-dom-elements.md | 2 +-
content/docs/reference-glossary.md | 2 +-
content/docs/reference-test-renderer.md | 4 +-
content/docs/state-and-lifecycle.md | 14 +++----
content/docs/static-type-checking.md | 2 +-
content/docs/thinking-in-react.md | 6 +--
content/docs/uncontrolled-components.md | 2 +-
src/pages/acknowledgements.html.js | 8 ++--
27 files changed, 82 insertions(+), 82 deletions(-)
diff --git a/content/docs/accessibility.md b/content/docs/accessibility.md
index d387921ca..451ea2cc8 100644
--- a/content/docs/accessibility.md
+++ b/content/docs/accessibility.md
@@ -19,8 +19,8 @@ The [Web Content Accessibility Guidelines](https://www.w3.org/WAI/intro/wcag) pr
The following WCAG checklists provide an overview:
- [WCAG checklist from Wuhcag](https://www.wuhcag.com/wcag-checklist/)
-- [WCAG checklist from WebAIM](http://webaim.org/standards/wcag/checklist)
-- [Checklist from The A11Y Project](http://a11yproject.com/checklist.html)
+- [WCAG checklist from WebAIM](https://webaim.org/standards/wcag/checklist)
+- [Checklist from The A11Y Project](https://a11yproject.com/checklist.html)
### WAI-ARIA
@@ -114,7 +114,7 @@ Every HTML form control, such as `` and `
From ea69a385dca7c48c63f4c35fec345b9e1ba76e9a Mon Sep 17 00:00:00 2001
From: Nat Alison
Date: Sat, 16 Feb 2019 19:23:49 -0800
Subject: [PATCH 065/118] fix broken audio link in community roundup 26
---
content/blog/2015-03-30-community-roundup-26.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/blog/2015-03-30-community-roundup-26.md b/content/blog/2015-03-30-community-roundup-26.md
index ae2dc4979..ec30f30f3 100644
--- a/content/blog/2015-03-30-community-roundup-26.md
+++ b/content/blog/2015-03-30-community-roundup-26.md
@@ -29,7 +29,7 @@ Colin also [blogged about his experience using React Native](http://blog.scottlo
Spencer Ahrens and I had the great pleasure to talk about React Native on [The Changelog](https://thechangelog.com/149/) podcast. It was really fun to chat for an hour, I hope that you'll enjoy listening to it. :)
-
+
## Hacker News {#hacker-news}
From cd7bfe7b2faebe72d7bd2500926fb7e9f0913c77 Mon Sep 17 00:00:00 2001
From: Farhad Yasir
Date: Mon, 18 Feb 2019 11:55:05 +1100
Subject: [PATCH 066/118] fix(renderExamplePlaceholder):
renderExamplePlaceholder removed as its never used
---
src/pages/index.js | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/pages/index.js b/src/pages/index.js
index bc2d732fd..f52619ce2 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -310,13 +310,6 @@ Home.propTypes = {
}).isRequired,
};
-function renderExamplePlaceholder(containerId) {
- ReactDOM.render(
-
Date: Mon, 11 Feb 2019 20:27:14 -0200
Subject: [PATCH 067/118] It solves a broken link on HOC doc
---
content/docs/higher-order-components.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/higher-order-components.md b/content/docs/higher-order-components.md
index 4d15f5b97..55cd60914 100644
--- a/content/docs/higher-order-components.md
+++ b/content/docs/higher-order-components.md
@@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent);
Whereas a component transforms props into UI, a higher-order component transforms a component into another component.
-HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reactjs/react-redux/blob/master/docs/api/connect.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html).
+HOCs are common in third-party React libraries, such as Redux's [`connect`](https://github.com/reduxjs/react-redux/blob/master/docs/api/connect.md#connect) and Relay's [`createFragmentContainer`](http://facebook.github.io/relay/docs/en/fragment-container.html).
In this document, we'll discuss why higher-order components are useful, and how to write your own.
From aaefe69287eed6da8fbc8c9dee7a418dce265579 Mon Sep 17 00:00:00 2001
From: Vasiliy Vanchuk
Date: Tue, 19 Feb 2019 15:27:43 +0400
Subject: [PATCH 068/118] Fix command for initializing tsconfig
Project dependency doesn't add itself it global PATH. So call `tsc` will work either with globally installed typescript, or from npm/yarn script.
---
content/docs/static-type-checking.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md
index b01b92fec..fd55d8bb6 100644
--- a/content/docs/static-type-checking.md
+++ b/content/docs/static-type-checking.md
@@ -219,7 +219,7 @@ Congrats! You've installed the latest version of TypeScript into your project. I
The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run:
```bash
-tsc --init
+npx tsc --init
```
Looking at the now generated `tsconfig.json`, you can see that there are many options you can use to configure the compiler. For a detailed description of all the options, check [here](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html).
From d4f7a2c2d9fcdf984526b1f43f04815361c02bf2 Mon Sep 17 00:00:00 2001
From: Deniz Susman
Date: Tue, 19 Feb 2019 15:32:42 +0300
Subject: [PATCH 069/118] Fix typo in blog
"collocation" instead of "colocation".
---
content/blog/2015-08-11-relay-technical-preview.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/blog/2015-08-11-relay-technical-preview.md b/content/blog/2015-08-11-relay-technical-preview.md
index c574ccce2..65b1ac5fb 100644
--- a/content/blog/2015-08-11-relay-technical-preview.md
+++ b/content/blog/2015-08-11-relay-technical-preview.md
@@ -13,7 +13,7 @@ While React simplified the process of developing complex user-interfaces, it lef
Declarative data-fetching means that Relay applications specify *what* data they need, not *how* to fetch that data. Just as React uses a description of the desired UI to manage view updates, Relay uses a data description in the form of GraphQL queries. Given these descriptions, Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates views as data changes.
-Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This colocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.
+Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This collocation allows developers to reason locally about their application and eliminates bugs such as under- or over-fetching data.
Relay is in use at Facebook in production apps, and we're using it more and more because *Relay lets developers focus on their products and move fast*. It's working for us and we'd like to share it with the community.
From 67167457763fac15d0429eb443e8870179b3fe60 Mon Sep 17 00:00:00 2001
From: Vasiliy Vanchuk
Date: Tue, 19 Feb 2019 18:42:05 +0400
Subject: [PATCH 070/118] Update static-type-checking.md
---
content/docs/static-type-checking.md | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md
index fd55d8bb6..553ea6354 100644
--- a/content/docs/static-type-checking.md
+++ b/content/docs/static-type-checking.md
@@ -216,9 +216,17 @@ Congrats! You've installed the latest version of TypeScript into your project. I
```
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler}
-The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run:
+The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file:
-```bash
+If you use [Yarn](https://yarnpkg.com/), run:
+
+```shell
+yarn run tsc --init
+```
+
+If you use [npm](https://www.npmjs.com/), run:
+
+```shell
npx tsc --init
```
From 2819a0f0ebee17646128edb4832aedd094051597 Mon Sep 17 00:00:00 2001
From: Dan Abramov
Date: Tue, 19 Feb 2019 17:50:35 +0000
Subject: [PATCH 071/118] Remove the "experimental" wording from Hooks intro
(#1709)
---
content/docs/hooks-intro.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/content/docs/hooks-intro.md b/content/docs/hooks-intro.md
index b4cefcfbe..9470d614d 100644
--- a/content/docs/hooks-intro.md
+++ b/content/docs/hooks-intro.md
@@ -97,9 +97,7 @@ We know that React developers are focused on shipping products and don't have ti
We also understand that the bar for adding a new primitive to React is extremely high. For curious readers, we have prepared a [detailed RFC](https://github.com/reactjs/rfcs/pull/68) that dives into motivation with more details, and provides extra perspective on the specific design decisions and related prior art.
-**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** We are sharing this experimental API to get early feedback from those in the community who are interested in shaping the future of React — and we will iterate on Hooks in the open.
-
-Finally, there is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative.
+**Crucially, Hooks work side-by-side with existing code so you can adopt them gradually.** There is no rush to migrate to Hooks. We recommend avoiding any "big rewrites", especially for existing, complex class components. It takes a bit of a mindshift to start "thinking in Hooks". In our experience, it's best to practice using Hooks in new and non-critical components first, and ensure that everybody on your team feels comfortable with them. After you give Hooks a try, please feel free to [send us feedback](https://github.com/facebook/react/issues/new), positive or negative.
We intend for Hooks to cover all existing use cases for classes, but **we will keep supporting class components for the foreseeable future.** At Facebook, we have tens of thousands of components written as classes, and we have absolutely no plans to rewrite them. Instead, we are starting to use Hooks in the new code side by side with classes.
From 0569c21da09d4c15b8cb1e749bde85db146bbb39 Mon Sep 17 00:00:00 2001
From: "Juan J. Alvarez"
Date: Tue, 19 Feb 2019 10:49:19 -0800
Subject: [PATCH 072/118] Added Reactathon 2019 to conferences.md (#1695)
---
content/community/conferences.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/content/community/conferences.md b/content/community/conferences.md
index 78f868d7f..c10cdb607 100644
--- a/content/community/conferences.md
+++ b/content/community/conferences.md
@@ -16,6 +16,11 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
January 31, 2019 in Tehran, Iran
[Website](http://reactiran.com) - [Instagram](https://www.instagram.com/reactiran/)
+### Reactathon 2019 {#reactathon-2019}
+March 30-31, 2019 in San Francisco, USA
+
+[Website](https://www.reactathon.com/) - [Twitter](https://twitter.com/reactathon)
+
### App.js Conf 2019 {#appjs-conf-2019}
April 4-5, 2019 in Kraków, Poland
From 0948bf553eac307d48622e4275953baf83dc1bcf Mon Sep 17 00:00:00 2001
From: Alexey Pyltsyn
Date: Wed, 20 Feb 2019 01:48:07 +0300
Subject: [PATCH 073/118] Update static-type-checking.md
---
content/docs/static-type-checking.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/docs/static-type-checking.md b/content/docs/static-type-checking.md
index 553ea6354..0f459aa84 100644
--- a/content/docs/static-type-checking.md
+++ b/content/docs/static-type-checking.md
@@ -220,13 +220,13 @@ The compiler is of no help to us until we tell it what to do. In TypeScript, the
If you use [Yarn](https://yarnpkg.com/), run:
-```shell
+```bash
yarn run tsc --init
```
If you use [npm](https://www.npmjs.com/), run:
-```shell
+```bash
npx tsc --init
```
From a9989290aaaf7858d7c2d6ccf8c8e7948c60b33b Mon Sep 17 00:00:00 2001
From: Joe Maddalone
Date: Wed, 20 Feb 2019 07:49:09 -0600
Subject: [PATCH 074/118] Add React Loop 2019 (#1693)
---
content/community/conferences.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/content/community/conferences.md b/content/community/conferences.md
index c10cdb607..a9e3694f7 100644
--- a/content/community/conferences.md
+++ b/content/community/conferences.md
@@ -41,6 +41,11 @@ 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)
+
### ComponentsConf 2019 {#componentsconf-2019}
September 6, 2019 in Melbourne, Australia
[Website](https://www.componentsconf.com.au/) - [Twitter](https://twitter.com/componentsconf)
From e5a97f2d7e2af8ef6ff2a0559790fb85aa7955b7 Mon Sep 17 00:00:00 2001
From: Varser Zakaryan <37110358+varszakaryan@users.noreply.github.com>
Date: Wed, 20 Feb 2019 17:49:38 +0400
Subject: [PATCH 075/118] Add React Conf Armenia 2019 to conferences (#1715)
This is the first React Conf in the region and it is going to be cool.
---
content/community/conferences.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/content/community/conferences.md b/content/community/conferences.md
index a9e3694f7..62ac39b40 100644
--- a/content/community/conferences.md
+++ b/content/community/conferences.md
@@ -36,6 +36,11 @@ 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)
+
### React Norway 2019 {#react-norway-2019}
June 12, 2019. Larvik, Norway
From 54250e52d306d9d530766209e34d59d472c780d9 Mon Sep 17 00:00:00 2001
From: Aziza Ismayilova
Date: Wed, 20 Feb 2019 19:47:22 +0400
Subject: [PATCH 076/118] Fix code splitting docs mistakes
---
content/docs/code-splitting.md | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md
index 180139829..2a3984ebb 100644
--- a/content/docs/code-splitting.md
+++ b/content/docs/code-splitting.md
@@ -40,7 +40,7 @@ console.log(add(16, 26)); // 42
>
> Sizin paketləriniz yuxarıdankından çox fərqli olacaq.
-Əgər siz [Create React App](https://github.com/facebookincubator/create-react-app), [Next.js](https://github.com/zeit/next.js/), [Gatsby](https://www.gatsbyjs.org/), və ya oxşar bir alət işlədirsinizsə, applikasiyanı paketləmək üçün Webpack sizdə hazır qoşulmuş olacaq.
+Əgər siz [Create React App](https://github.com/facebookincubator/create-react-app), [Next.js](https://github.com/zeit/next.js/), [Gatsby](https://www.gatsbyjs.org/) və ya oxşar bir alət işlədirsinizsə, applikasiyanı paketləmək üçün Webpack sizdə hazır qoşulmuş olacaq.
Əgər siz belə alətlərdən istifadə etmirsinizsə, siz paketləməni özünüz qoşmalısınız. Misal üçün, Webpack sənədlərində [İnstalyasiya](https://webpack.js.org/guides/installation/) və
[Başlamaq](https://webpack.js.org/guides/getting-started/) təlimatlarına baxın.
@@ -75,13 +75,13 @@ import("./math").then(math => {
> Qeyd:
>
-> Dinamik `import()` sintaksisi ECMAScript (JavaScript)
-> [təklifi fazasındadır](https://github.com/tc39/proposal-dynamic-import) və hələki dilin standartının
+> Dinamik `import()` sintaksisi ECMAScript (JavaScript)
+> [təklifi fazasındadır](https://github.com/tc39/proposal-dynamic-import) və hələki dil standartının
> bir hissəsi deyil. Bu təklif yaxın gələcəkdə standarta qəbul ediləcək.
Webpack bu sintaksisi görən kimi, sizin applikasiyanızın kodunu avtomatik parçalayacaq. Əgər siz Create React App işlədirsinizsə, bu xüsusiyyət artiq sizin üçün konfiqurasiya olunub və siz dərhal bunu [işlədə bilərsiniz](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting). Bu xusiyyəti həmçinin [Next.js](https://github.com/zeit/next.js/#dynamic-import) də dəstəkləyir.
-Əgər siz Webpack-i özünüz quraşdırırsınızsa, Webpack-in [kod parçalaması haqqında təlimatını](https://webpack.js.org/guides/code-splitting/) oxumaq sizə lazım olacaq. Sizin Webpack konfiqurasiyanız təxminən [belə bir formada](https://gist.github.com/gaearon/ca6e803f5c604d37468b0091d9959269) görünəcək.
+Əgər Webpack-i özünüz quraşdırırsınızsa, Webpack-in [kod parçalaması haqqında təlimatını](https://webpack.js.org/guides/code-splitting/) oxumaq sizə lazım olacaq. Sizin Webpack konfiqurasiyanız təxminən [belə bir formada](https://gist.github.com/gaearon/ca6e803f5c604d37468b0091d9959269) görünəcək.
[Babel](http://babeljs.io/) işlədərkən Babel-ın dinamik import sintaksisini təhlil edə bilməsi amma transformasiya edə bilməməsi lazımdır. Bunun üçün siz [babel-plugin-syntax-dynamic-import](https://yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import)-dan istifadə edə bilərsiniz.
@@ -93,7 +93,7 @@ Webpack bu sintaksisi görən kimi, sizin applikasiyanızın kodunu avtomatik pa
`React.lazy` funskiyası dinamik import olunmuş komponenti adi komponent kimi render etməyə imkan yaradır.
-**Before:**
+**Əvvəl:**
```js
import OtherComponent from './OtherComponent';
@@ -107,7 +107,7 @@ function MyComponent() {
}
```
-**After:**
+**Sonra:**
```js
const OtherComponent = React.lazy(() => import('./OtherComponent'));
@@ -123,7 +123,7 @@ function MyComponent() {
Bu avtomatik olara `OtherComponent` render olduğu zaman, komponent olan paketi yükləyəcək.
-`React.lazy` funskiyası mütləq olaraq dinamik `import()` funskiyasını çağırmalıdır. Bu mütləq `default` eksportunda React komponenti olan modulu "resolve" edən `Promise` qaytarmalıdır.
+`React.lazy` funskiyası mütləq olaraq dinamik `import()` funskiyasını çağırmalıdır. Bu mütləq `default` eksportunda React komponenti olan modulu "resolve" edən `Promise`-ə qaytarmalıdır.
### Suspense {#suspense}
@@ -165,7 +165,7 @@ function MyComponent() {
### Xəta sərhədləri {#error-boundaries}
-Əgər modulun yüklənməsi uğursuz keçirsə (məsələn şəbəkə problemlərinə görə), xəta göstəriləcək. Siz yaxşı İstifadəçi Təcrübəsi üçün bu xətaları tutmaq və bu xətaları bərpa etmək üçün [Xəta Sərhədlərindən](/docs/error-boundaries.html) istifadə edə bilərsiniz. Xəta Sərhədini yaratdıqdan sonra, siz şəbəkə xətası göstərmək üçün bu xəta sərhədini lazy komponentin yuxarısında istənilən yerdə istifadə edə bilərsiniz.
+Əgər modulun yüklənməsi uğursuz keçirsə (məsələn, şəbəkə problemlərinə görə), xəta göstəriləcək. Siz yaxşı İstifadəçi Təcrübəsi üçün bu xətaları tutmaq və bu xətaları bərpa etmək üçün [Xəta Sərhədlərindən](/docs/error-boundaries.html) istifadə edə bilərsiniz. Xəta Sərhədini yaratdıqdan sonra, siz şəbəkə xətası göstərmək üçün bu xəta sərhədini lazy komponentin yuxarısında istənilən yerdə istifadə edə bilərsiniz.
```js
import MyErrorBoundary from './MyErrorBoundary';
@@ -188,7 +188,7 @@ const MyComponent = () => (
## Route əsasında kod parçalaması {#route-based-code-splitting}
-Applikasiyanızda harada kod parçalaması etmək biraz çaşdırıcı ola bilər. Siz həmişə İstifadəçi Təcrübəsini pozmamaq və paketləri bərabər ayrılmaq üçün düzgün yerdən applikasiyanı bölməlisiniz.
+Applikasiyanızda harada kod parçalaması etmək biraz çaşdırıcı ola bilər. Siz həmişə İstifadəçi Təcrübəsini pozmamaq və paketləri bərabər ayırlmaq üçün düzgün yerdən applikasiyanı bölməlisiniz.
Yaxşı başlanğıc nöqtəsi route-lardan bölməni aparmaqdır. Bir çox insan vebdə səhifə keçidlərinin yüklənməsinin zaman aldığına vərdiş ediblər. Bu zaman siz həmçinin bütün səhifəni dərhal yenidən render edirsiniz deyə istifadəçilər eyni zamanda səhifədəki başqa elementlərə qarşılıqlı təsir etmirlər.
@@ -215,7 +215,7 @@ const App = () => (
## Adlı Eksportlar {#named-exports}
-`React.lazy` yalnız `default` eksportları dəstəkləyir. Əgər sizin import istədiyiniz modul, adlı eksportlar edirsə, siz bu adlı eksportu yenidən `default` eksport edən ara modulu yarada bilərsiniz. Bu treeshaking-in işlədiyini və lazım olmayan komponentlərin yüklənmədiyini təmin edir.
+`React.lazy` yalnız `default` eksportları dəstəkləyir. Əgər sizin import etmək istədiyiniz modul, adlı eksportlar edirsə, siz bu adlı eksportları yenidən `default` eksport edən ara modulu yarada bilərsiniz. Bu treeshaking-in işlədiyini və lazım olmayan komponentlərin yüklənmədiyini təmin edir.
```js
// ManyComponents.js
From 84e474238db143151f68ae33ceec54f2b9e1dcbc Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 00:23:38 +0400
Subject: [PATCH 077/118] =?UTF-8?q?=C4=B0ntroducing-jsx=20translate?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
İntroducing-jsx translate
---
content/docs/introducing-jsx.md | 80 +++++++++++++++++----------------
1 file changed, 41 insertions(+), 39 deletions(-)
diff --git a/content/docs/introducing-jsx.md b/content/docs/introducing-jsx.md
index d76c3ace6..ce765c681 100644
--- a/content/docs/introducing-jsx.md
+++ b/content/docs/introducing-jsx.md
@@ -1,36 +1,36 @@
---
id: introducing-jsx
-title: Introducing JSX
+title: JSX-ə giriş
permalink: docs/introducing-jsx.html
prev: hello-world.html
next: rendering-elements.html
---
-Consider this variable declaration:
+Bu dəyişən bəyannaməni nəzərdən keçirin:
```js
const element =
Hello, world!
;
```
-This funny tag syntax is neither a string nor HTML.
+Bu məzəli tag sintaksisi nə bir simlidir(string), nə də HTML.
-It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI should look like. JSX may remind you of a template language, but it comes with the full power of JavaScript.
+Bu JSX adlanır və JavaScript üçün sintaksis əlavəsidir. İstifadəçi interfeysinin görünməsi üçün React ilə istifadə etməyi məsləhət görürük. JSX şablon dilini sizə xatırlata bilər, lakin JavaScript-in tam funksionallığını istifadə imkanı yaradır.
-JSX produces React "elements". We will explore rendering them to the DOM in the [next section](/docs/rendering-elements.html). Below, you can find the basics of JSX necessary to get you started.
+JSX React "elementləri"-ni yaradır. Bunları [sonrakı bölmə] (/docs/rendering-elements.html) daxilində DOM-da göstərməyi tədbiq edəcəyik. Aşağıda, siz başlamağınız üçün lazım olan JSX əsaslarını tapa bilərsiniz.
-### Why JSX? {#why-jsx}
+### Niyə JSX? {#why-jsx}
-React embraces the fact that rendering logic is inherently coupled with other UI logic: how events are handled, how the state changes over time, and how the data is prepared for display.
+Reakt, aplikasiynın işləmə məntiqinin digər UI məntiqləri ilə birləşdirildiyini: hadisələrin(events) necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair reallığı əhatə edir.
-Instead of artificially separating *technologies* by putting markup and logic in separate files, React [separates *concerns*](https://en.wikipedia.org/wiki/Separation_of_concerns) with loosely coupled units called "components" that contain both. We will come back to components in a [further section](/docs/components-and-props.html), but if you're not yet comfortable putting markup in JS, [this talk](https://www.youtube.com/watch?v=x7cQ3mrcKaY) might convince you otherwise.
+Fərqli fayllarda markup və məntiq quraraq * texnologiyaları * süni şəkildə ayırmaq əvəzinə React [hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə](https://en.wikipedia.org/wiki/Separation_of_concerns) reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) bu sizi əksinə razı sala bilər.
-React [doesn't require](/docs/react-without-jsx.html) using JSX, but most people find it helpful as a visual aid when working with UI inside the JavaScript code. It also allows React to show more useful error and warning messages.
+React JSX-i istifadə etməyi [tələb etmir](/docs/react-without-jsx.html), amma bir çoxları bunu Javascript içərisində Uİ ilə işləyən zaman faydalı hesab edir. Həmçinin React-a daha çox faydalı səhv və xəbərdarlıq mesajları göstərməyə də imkan verir.
-With that out of the way, let's get started!
+Burdan yola çıxaraq, gəlin başlayaq!
-### Embedding Expressions in JSX {#embedding-expressions-in-jsx}
+### JSX-də ifadələr yerləşdirmə {#embedding-expressions-in-jsx}
-In the example below, we declare a variable called `name` and then use it inside JSX by wrapping it in curly braces:
+Aşağıdakı misalda `name` adlı bir dəyişən elan edirik və onu JSX daxilində fiqurlu mötərizə ilə istifadə edirik:
```js{1,2}
const name = 'Josh Perez';
@@ -42,9 +42,9 @@ ReactDOM.render(
);
```
-You can put any valid [JavaScript expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions) inside the curly braces in JSX. For example, `2 + 2`, `user.firstName`, or `formatName(user)` are all valid JavaScript expressions.
+JSX daxilində fiqurlu mötərizə içərisində istənilən [JavaScript ifadəsi](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions) istifadə edə bilərsiniz. Misal üçün. `2+2`, `user.firstName`, və ya `formatName(user)`, hər biri doğru(valid) Javascript ifadəsidir.
-In the example below, we embed the result of calling a JavaScript function, `formatName(user)`, into an `
` elementinin daxilinə yerləşdirrik.
```js{12}
function formatName(user) {
@@ -70,13 +70,13 @@ ReactDOM.render(
[](codepen://introducing-jsx)
-We split JSX over multiple lines for readability. While it isn't required, when doing this, we also recommend wrapping it in parentheses to avoid the pitfalls of [automatic semicolon insertion](http://stackoverflow.com/q/2846283).
+JSX-i kodun rahat oxunması üçün bir neçə sətirə bölürük. Bunun tələb olunmamasına baxmayaraq, [avtomatik olaraq nöqtəli vergüllərin yerləşdirilməsinin](http://stackoverflow.com/q/2846283) qarşısını almaq üçün onu mötərizədə saxlamağı məsləhət görürük
-### JSX is an Expression Too {#jsx-is-an-expression-too}
+### JSX həmçinin ifadədir {#jsx-is-an-expression-too}
-After compilation, JSX expressions become regular JavaScript function calls and evaluate to JavaScript objects.
+Kompilyasiya edilrikdən sonra, JSX ifadələri adi JavaScript funksiyalarına və JavaScript obyektlərinə çevrilir.
-This means that you can use JSX inside of `if` statements and `for` loops, assign it to variables, accept it as arguments, and return it from functions:
+Bu o deməkdir ki, JSX daxilində siz `if` və `for` ifadələrindən istifadə edərək onları dəyişənlərə bərabər edə və onları funksiyadan çağıra bilərik:
```js{3,5}
function getGreeting(user) {
@@ -87,37 +87,38 @@ function getGreeting(user) {
}
```
-### Specifying Attributes with JSX {#specifying-attributes-with-jsx}
+### JSX-lə Atributları Bildirmək {#specifying-attributes-with-jsx}
-You may use quotes to specify string literals as attributes:
+Simli literalları dırnaq açaraq bildirə bilərsiniz:
```js
const element = ;
```
-You may also use curly braces to embed a JavaScript expression in an attribute:
+Həmçinin fiqurlu mötərizələrdən istifadə edərək Javascript ifadəsini atribut kimi bildirə bilərsiniz:
```js
const element = ;
```
-Don't put quotes around curly braces when embedding a JavaScript expression in an attribute. You should either use quotes (for string values) or curly braces (for expressions), but not both in the same attribute.
+Javascript ifadələrini atribut kimi bildirərkən bunu dırnaq içində etməyin. Dırnaq açaraq yalnız simli(string) atributları və ya fiqurlu mötərizələrdən istifadə edərək ifadələri bildirə bilərsiniz, lakin bunu eyni atributda etməyin.
->**Warning:**
+>**Xəbərdarlıq:**
>
->Since JSX is closer to JavaScript than to HTML, React DOM uses `camelCase` property naming convention instead of HTML attribute names.
+>JSX Javasript-ə HTML-dən daha yaxın olduğundan React DOM xüsusiyyət adlarından standart HTML atributlarının əvəzinə `camelCase`-dən istfadə edərək işlədir.
>
->For example, `class` becomes [`className`](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) in JSX, and `tabindex` becomes [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex).
+>Misal üçün, `class` JSX-də [`className`](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)-ə çevrilir, və `tabindex` [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex)-ə çevrilir.
-### Specifying Children with JSX {#specifying-children-with-jsx}
+### Uşaqları(children) JSX ilə ifadə etmək {#specifying-children-with-jsx}
-If a tag is empty, you may close it immediately with `/>`, like XML:
+Əgər tag daxilində başqa tag yoxdursa onu dərhal XML kimi `/>`-lə bağlaya bilərsiniz:
```js
const element = ;
```
-JSX tags may contain children:
+
+JSX tag daxilində başqa taglar ehtiva edə bilər:
```js
const element = (
@@ -128,9 +129,9 @@ const element = (
);
```
-### JSX Prevents Injection Attacks {#jsx-prevents-injection-attacks}
+### JSX Enjeksiyon hücumlarını qarşısını alır{#jsx-prevents-injection-attacks}
-It is safe to embed user input in JSX:
+JSX-də istifadəçi girişini yerləşdirə bilərsiniz:
```js
const title = response.potentiallyMaliciousInput;
@@ -138,13 +139,13 @@ const title = response.potentiallyMaliciousInput;
const element =
{title}
;
```
-By default, React DOM [escapes](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) any values embedded in JSX before rendering them. Thus it ensures that you can never inject anything that's not explicitly written in your application. Everything is converted to a string before being rendered. This helps prevent [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) attacks.
+React DOM JSX daxilində yerləşdirilmiş bütün ifadələri [escapes](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) edir, yəni təhlükəsiz vəziyyət gətirir. Beləliklə, tətbiqinizdə açıq şəkildə yazılmayan heç bir ifadə enjektə edilə bilməz. Hər şey `render`-dən öncə simli(string)-ə çevrilir və bu [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) hücumlarının qarşısını alır.
-### JSX Represents Objects {#jsx-represents-objects}
+### JSX Obyektləri təmsil edir {#jsx-represents-objects}
-Babel compiles JSX down to `React.createElement()` calls.
+Babel JSX-i `React.createElement()` çağıraraq kompayl edir.
-These two examples are identical:
+Bu iki ifadə identikdir:
```js
const element = (
@@ -162,7 +163,7 @@ const element = React.createElement(
);
```
-`React.createElement()` performs a few checks to help you write bug-free code but essentially it creates an object like this:
+`React.createElement()` bir neçə yoxlama edərək sizə bug-sız kod yazmağa kömək edir, lakin əsasən aşağıda qeyd oluna kimi obyekt yaradır:
```js
// Note: this structure is simplified
@@ -175,10 +176,11 @@ const element = {
};
```
-These objects are called "React elements". You can think of them as descriptions of what you want to see on the screen. React reads these objects and uses them to construct the DOM and keep it up to date.
+Bu obyektlər "React element"-ləri adlandırılır. Siz onları ekranda görmək istədiklərinizin təsviri kimi düşünə bilərsiniz. React bu obyektləri oxuyur və onları DOM qurmaq və aktiv saxlamaq üçün istifadə edir.
+
+Sonrakı bölmədə DOM-a Reakt elementlərini render edilməyini araşdıracayıq.
-We will explore rendering React elements to the DOM in the next section.
->**Tip:**
+>**Məsləhət:**
>
->We recommend using the ["Babel" language definition](http://babeljs.io/docs/editors) for your editor of choice so that both ES6 and JSX code is properly highlighted. This website uses the [Oceanic Next](https://labs.voronianski.com/oceanic-next-color-scheme/) color scheme which is compatible with it.
+>ES6 və JSX kodlarının daha yaxşı seçilməsi üçün editorunuzda ["Babel" language definition](http://babeljs.io/docs/editors)-dan istifadə etməyi məsləhət görürük. Bu səhifədə qeyd olunanla uyğunlaşan [Oceanic Next](https://labs.voronianski.com/oceanic-next-color-scheme/) rəngləndirməsindən istifadə olunur.
From 7b5f4cf604f2d6c650b675f59fa1e34395aa995b Mon Sep 17 00:00:00 2001
From: David Svetlecic
Date: Wed, 20 Feb 2019 16:38:42 -0600
Subject: [PATCH 078/118] Add 'you'
---
content/docs/hooks-faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md
index 524c7068f..25e00c2ef 100644
--- a/content/docs/hooks-faq.md
+++ b/content/docs/hooks-faq.md
@@ -466,7 +466,7 @@ Note that this approach won't work in a loop because Hook calls [can't](/docs/ho
### How to create expensive objects lazily? {#how-to-create-expensive-objects-lazily}
-`useMemo` lets you [memoize an expensive calculation](#how-to-memoize-calculations) if the inputs are the same. However, it only serves as a hint, and doesn't *guarantee* the computation won't re-run. But sometimes need to be sure an object is only created once.
+`useMemo` lets you [memoize an expensive calculation](#how-to-memoize-calculations) if the inputs are the same. However, it only serves as a hint, and doesn't *guarantee* the computation won't re-run. But sometimes you need to be sure an object is only created once.
**The first common use case is when creating the initial state is expensive:**
From e4d30a164786e8ed147a50a2489f2d14f6b2b260 Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 11:00:30 +0400
Subject: [PATCH 079/118] Update conferences.md
---
content/community/conferences.md | 5 -----
1 file changed, 5 deletions(-)
diff --git a/content/community/conferences.md b/content/community/conferences.md
index 62ac39b40..a9e3694f7 100644
--- a/content/community/conferences.md
+++ b/content/community/conferences.md
@@ -36,11 +36,6 @@ 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)
-
### React Norway 2019 {#react-norway-2019}
June 12, 2019. Larvik, Norway
From ac03b9713204627303e73452aa1cb440e68f8018 Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 16:01:04 +0400
Subject: [PATCH 080/118] Update introducing-jsx.md
---
content/docs/introducing-jsx.md | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/content/docs/introducing-jsx.md b/content/docs/introducing-jsx.md
index ce765c681..9a44cd8eb 100644
--- a/content/docs/introducing-jsx.md
+++ b/content/docs/introducing-jsx.md
@@ -6,23 +6,23 @@ prev: hello-world.html
next: rendering-elements.html
---
-Bu dəyişən bəyannaməni nəzərdən keçirin:
+Bu dəyişən bəyannaməsini nəzərdən keçirin:
```js
const element =
Hello, world!
;
```
-Bu məzəli tag sintaksisi nə bir simlidir(string), nə də HTML.
+Bu məzəli təq sintaksisi nə bir sətrdir(string), nə də HTML.
-Bu JSX adlanır və JavaScript üçün sintaksis əlavəsidir. İstifadəçi interfeysinin görünməsi üçün React ilə istifadə etməyi məsləhət görürük. JSX şablon dilini sizə xatırlata bilər, lakin JavaScript-in tam funksionallığını istifadə imkanı yaradır.
+Bu JSX adlanır və JavaScript üçün sintaksis əlavəsidir. İstifadəçi interfeysinin görünməsi üçün React ilə istifadə etməyi məsləhət görürük. JSX şablon dilini sizə xatırlada bilər, lakin JavaScript-in tam funksionallığından istifadə imkanı yaradır.
-JSX React "elementləri"-ni yaradır. Bunları [sonrakı bölmə] (/docs/rendering-elements.html) daxilində DOM-da göstərməyi tədbiq edəcəyik. Aşağıda, siz başlamağınız üçün lazım olan JSX əsaslarını tapa bilərsiniz.
+JSX React "elementləri"-ni yaradır. Bunları [sonrakı bölmə](/docs/rendering-elements.html) daxilində DOM-da göstərməyi tədbiq edəcəyik. Aşağıda, siz başlamağınız üçün lazım olan JSX əsaslarını tapa bilərsiniz.
### Niyə JSX? {#why-jsx}
-Reakt, aplikasiynın işləmə məntiqinin digər UI məntiqləri ilə birləşdirildiyini: hadisələrin(events) necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair reallığı əhatə edir.
+Reakt, applikasiyasının işləmə məntiqinin digər UI məntiqləri ilə birləşdirildiyini: hadisələrin necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair məsələləri əhatə edir.
-Fərqli fayllarda markup və məntiq quraraq * texnologiyaları * süni şəkildə ayırmaq əvəzinə React [hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə](https://en.wikipedia.org/wiki/Separation_of_concerns) reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) bu sizi əksinə razı sala bilər.
+Fərqli fayllarda markup və məntiq quraraq *texnologiyaları* süni şəkildə ayırmaq əvəzinə React [hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə](https://en.wikipedia.org/wiki/Separation_of_concerns) reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) sizi əksinə razı sala bilər.
React JSX-i istifadə etməyi [tələb etmir](/docs/react-without-jsx.html), amma bir çoxları bunu Javascript içərisində Uİ ilə işləyən zaman faydalı hesab edir. Həmçinin React-a daha çox faydalı səhv və xəbərdarlıq mesajları göstərməyə də imkan verir.
@@ -44,7 +44,7 @@ ReactDOM.render(
JSX daxilində fiqurlu mötərizə içərisində istənilən [JavaScript ifadəsi](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions) istifadə edə bilərsiniz. Misal üçün. `2+2`, `user.firstName`, və ya `formatName(user)`, hər biri doğru(valid) Javascript ifadəsidir.
-Aşağıdakı misalda, `formatName(user)` JavaScript funksiyasını çağırmanın nəticəsini `
` elementinin daxilinə yerləşdiririk.
```js{12}
function formatName(user) {
@@ -74,7 +74,7 @@ JSX-i kodun rahat oxunması üçün bir neçə sətirə bölürük. Bunun tələ
### JSX həmçinin ifadədir {#jsx-is-an-expression-too}
-Kompilyasiya edilrikdən sonra, JSX ifadələri adi JavaScript funksiyalarına və JavaScript obyektlərinə çevrilir.
+Kompilyasiya edildikdən sonra, JSX ifadələri adi JavaScript funksiyalarına və JavaScript obyektlərinə çevrilir.
Bu o deməkdir ki, JSX daxilində siz `if` və `for` ifadələrindən istifadə edərək onları dəyişənlərə bərabər edə və onları funksiyadan çağıra bilərik:
@@ -109,7 +109,7 @@ Javascript ifadələrini atribut kimi bildirərkən bunu dırnaq içində etməy
>
>Misal üçün, `class` JSX-də [`className`](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)-ə çevrilir, və `tabindex` [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex)-ə çevrilir.
-### Uşaqları(children) JSX ilə ifadə etmək {#specifying-children-with-jsx}
+### Uşaqları JSX ilə ifadə etmək {#specifying-children-with-jsx}
Əgər tag daxilində başqa tag yoxdursa onu dərhal XML kimi `/>`-lə bağlaya bilərsiniz:
@@ -129,7 +129,7 @@ const element = (
);
```
-### JSX Enjeksiyon hücumlarını qarşısını alır{#jsx-prevents-injection-attacks}
+### JSX Enjeksiyon hücumlarını qarşısını alır {#jsx-prevents-injection-attacks}
JSX-də istifadəçi girişini yerləşdirə bilərsiniz:
@@ -139,7 +139,7 @@ const title = response.potentiallyMaliciousInput;
const element =
{title}
;
```
-React DOM JSX daxilində yerləşdirilmiş bütün ifadələri [escapes](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) edir, yəni təhlükəsiz vəziyyət gətirir. Beləliklə, tətbiqinizdə açıq şəkildə yazılmayan heç bir ifadə enjektə edilə bilməz. Hər şey `render`-dən öncə simli(string)-ə çevrilir və bu [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) hücumlarının qarşısını alır.
+React DOM JSX daxilində yerləşdirilmiş bütün ifadələri [escape](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) edir, yəni təhlükəsiz vəziyyət gətirir. Beləliklə, tətbiqinizdə açıq şəkildə yazılmayan heç bir ifadə enjektə edilə bilməz. Hər şey `render`-dən öncə simli(string)-ə çevrilir və bu [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) hücumlarının qarşısını alır.
### JSX Obyektləri təmsil edir {#jsx-represents-objects}
From 3084e5a49b47b61b8e1aa861644e7444bef28ccb Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 16:06:21 +0400
Subject: [PATCH 081/118] Update introducing-jsx.md
---
content/docs/introducing-jsx.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/introducing-jsx.md b/content/docs/introducing-jsx.md
index 9a44cd8eb..deed2818b 100644
--- a/content/docs/introducing-jsx.md
+++ b/content/docs/introducing-jsx.md
@@ -22,7 +22,7 @@ JSX React "elementləri"-ni yaradır. Bunları [sonrakı bölmə](/docs/renderin
Reakt, applikasiyasının işləmə məntiqinin digər UI məntiqləri ilə birləşdirildiyini: hadisələrin necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair məsələləri əhatə edir.
-Fərqli fayllarda markup və məntiq quraraq *texnologiyaları* süni şəkildə ayırmaq əvəzinə React [hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə](https://en.wikipedia.org/wiki/Separation_of_concerns) reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) sizi əksinə razı sala bilər.
+Fərqli fayllarda markup və məntiq quraraq *texnologiyaları* süni şəkildə ayırmaq əvəzinə React [*problemləri* ayıraraq](https://en.wikipedia.org/wiki/Separation_of_concerns) hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) sizi əksinə razı sala bilər.
React JSX-i istifadə etməyi [tələb etmir](/docs/react-without-jsx.html), amma bir çoxları bunu Javascript içərisində Uİ ilə işləyən zaman faydalı hesab edir. Həmçinin React-a daha çox faydalı səhv və xəbərdarlıq mesajları göstərməyə də imkan verir.
From 0711301ffa72fb3f7537bd189e9d2c8106333d30 Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 17:48:55 +0400
Subject: [PATCH 082/118] Update introducing-jsx.md
---
content/docs/introducing-jsx.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/introducing-jsx.md b/content/docs/introducing-jsx.md
index deed2818b..a5ac548db 100644
--- a/content/docs/introducing-jsx.md
+++ b/content/docs/introducing-jsx.md
@@ -20,7 +20,7 @@ JSX React "elementləri"-ni yaradır. Bunları [sonrakı bölmə](/docs/renderin
### Niyə JSX? {#why-jsx}
-Reakt, applikasiyasının işləmə məntiqinin digər UI məntiqləri ilə birləşdirildiyini: hadisələrin necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair məsələləri əhatə edir.
+Reakt, applikasiyasının işləmə məntiqinin digər Uİ məntiqləri ilə birləşdirildiyini: hadisələrin necə idarə olunduğunu, state-in zamanla necə dəyişdiyini və göstərilən məlumatların necə nümayiş olunacağına dair məsələləri əhatə edir.
Fərqli fayllarda markup və məntiq quraraq *texnologiyaları* süni şəkildə ayırmaq əvəzinə React [*problemləri* ayıraraq](https://en.wikipedia.org/wiki/Separation_of_concerns) hər ikisini ehtiva edən "komponentlər" adlandırılan birləşmələrlə reallaşdırdı. [Növbəti bölmədə](/docs/components-and-props.html) komponentlərə geri qayıdacağıq, lakin JS-də markup qurmaqda hələ rahat deyilsinizsə, [bu](https://www.youtube.com/watch?v=x7cQ3mrcKaY) sizi əksinə razı sala bilər.
From c889aef74eead64f3fb10a730be1429177515a11 Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Thu, 21 Feb 2019 20:01:05 +0400
Subject: [PATCH 083/118] =?UTF-8?q?Change=20"D=C9=99rsiliyi=20G=C3=B6t?=
=?UTF-8?q?=C3=BCr"=20to=20"D=C9=99rsliy=C9=99=20Ba=C5=9Fla"=20(#29)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Change Dərsiliyi Götür to Dərsiliyə Başla
Change Dərsiliyi Götür to Dərsiliyə Başla
* Update changes
Update changes
* Update index.js
* Change tutorial button text in header
---
src/pages/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/index.js b/src/pages/index.js
index 34bf30de0..3a522111f 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -154,7 +154,7 @@ class Home extends Component {
- Dərsiliyi Götür
+ Dərsiliyi Oxu
@@ -291,7 +291,7 @@ class Home extends Component {
- Dərsiliyi Götür
+ Dərsliyi Oxu
From 4a7df5686bc378f3536b2b402a2295c922de546e Mon Sep 17 00:00:00 2001
From: Dan Abramov
Date: Thu, 21 Feb 2019 20:05:29 +0000
Subject: [PATCH 084/118] Bump React to 16.8.3 (#1724)
---
package.json | 4 ++--
src/site-constants.js | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package.json b/package.json
index a18d1d5c8..f1628e72e 100644
--- a/package.json
+++ b/package.json
@@ -46,8 +46,8 @@
"normalize.css": "^8.0.0",
"prettier": "^1.7.4",
"prismjs": "^1.15.0",
- "react": "16.8.2",
- "react-dom": "16.8.2",
+ "react": "16.8.3",
+ "react-dom": "16.8.3",
"react-helmet": "^5.2.0",
"react-live": "1.8.0-0",
"remarkable": "^1.7.1",
diff --git a/src/site-constants.js b/src/site-constants.js
index 5f217fa00..5144290f8 100644
--- a/src/site-constants.js
+++ b/src/site-constants.js
@@ -8,7 +8,7 @@
// NOTE: We can't just use `location.toString()` because when we are rendering
// the SSR part in node.js we won't have a proper location.
const urlRoot = 'https://reactjs.org';
-const version = '16.8.2';
+const version = '16.8.3';
const babelURL = 'https://unpkg.com/babel-standalone@6.26.0/babel.min.js';
export {urlRoot, version, babelURL};
From 927a44a0b43fb5968d58f71891c28970834f2e06 Mon Sep 17 00:00:00 2001
From: Farhad Yasir
Date: Fri, 22 Feb 2019 16:33:27 +1100
Subject: [PATCH 085/118] fix(remove-unused-var): Unused variable ReactDOM
removed
---
src/pages/index.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/pages/index.js b/src/pages/index.js
index f52619ce2..790efd439 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -17,7 +17,6 @@ import {colors, media, sharedStyles} from 'theme';
import loadScript from 'utils/loadScript';
import createOgUrl from 'utils/createOgUrl';
import {babelURL} from 'site-constants';
-import ReactDOM from 'react-dom';
import logoWhiteSvg from 'icons/logo-white.svg';
class Home extends Component {
From e5bb4393caa90633e7ec35d9463ac1e218cf96e9 Mon Sep 17 00:00:00 2001
From: Gasim Gasimzada
Date: Sat, 23 Feb 2019 03:07:45 +0400
Subject: [PATCH 086/118] Use HTTPs for code splitting babel link in AZ
translation
---
content/docs/code-splitting.md | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md
index 4bb6ee872..70a570be4 100644
--- a/content/docs/code-splitting.md
+++ b/content/docs/code-splitting.md
@@ -83,12 +83,7 @@ Webpack bu sintaksisi görən kimi, sizin applikasiyanızın kodunu avtomatik pa
Əgər Webpack-i özünüz quraşdırırsınızsa, Webpack-in [kod parçalaması haqqında təlimatını](https://webpack.js.org/guides/code-splitting/) oxumaq sizə lazım olacaq. Sizin Webpack konfiqurasiyanız təxminən [belə bir formada](https://gist.github.com/gaearon/ca6e803f5c604d37468b0091d9959269) görünəcək.
-<<<<<<< HEAD
-[Babel](http://babeljs.io/) işlədərkən Babel-ın dinamik import sintaksisini təhlil edə bilməsi amma transformasiya edə bilməməsi lazımdır. Bunun üçün siz [babel-plugin-syntax-dynamic-import](https://yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import)-dan istifadə edə bilərsiniz.
-=======
-When using [Babel](https://babeljs.io/), you'll need to make sure that Babel can
-parse the dynamic import syntax but is not transforming it. For that you will need [babel-plugin-syntax-dynamic-import](https://yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import).
->>>>>>> d615c5b7bcceef420c7f9246035f8ae3ba8ae11a
+[Babel](https://babeljs.io/) işlədərkən Babel-ın dinamik import sintaksisini təhlil edə bilməsi amma transformasiya edə bilməməsi lazımdır. Bunun üçün siz [babel-plugin-syntax-dynamic-import](https://yarnpkg.com/en/package/babel-plugin-syntax-dynamic-import)-dan istifadə edə bilərsiniz.
## `React.lazy` {#reactlazy}
From 19131a5d2ebf10fff1f286f580d5cb2404879f37 Mon Sep 17 00:00:00 2001
From: Haqverdi Behbudov
Date: Sat, 23 Feb 2019 13:27:32 +0400
Subject: [PATCH 087/118] http to https changed all links
---
content/docs/introducing-jsx.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/content/docs/introducing-jsx.md b/content/docs/introducing-jsx.md
index a5ac548db..307ad15d2 100644
--- a/content/docs/introducing-jsx.md
+++ b/content/docs/introducing-jsx.md
@@ -70,7 +70,7 @@ ReactDOM.render(
[](codepen://introducing-jsx)
-JSX-i kodun rahat oxunması üçün bir neçə sətirə bölürük. Bunun tələb olunmamasına baxmayaraq, [avtomatik olaraq nöqtəli vergüllərin yerləşdirilməsinin](http://stackoverflow.com/q/2846283) qarşısını almaq üçün onu mötərizədə saxlamağı məsləhət görürük
+JSX-i kodun rahat oxunması üçün bir neçə sətirə bölürük. Bunun tələb olunmamasına baxmayaraq, [avtomatik olaraq nöqtəli vergüllərin yerləşdirilməsinin](https://stackoverflow.com/q/2846283) qarşısını almaq üçün onu mötərizədə saxlamağı məsləhət görürük
### JSX həmçinin ifadədir {#jsx-is-an-expression-too}
@@ -139,7 +139,7 @@ const title = response.potentiallyMaliciousInput;
const element =
{title}
;
```
-React DOM JSX daxilində yerləşdirilmiş bütün ifadələri [escape](http://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) edir, yəni təhlükəsiz vəziyyət gətirir. Beləliklə, tətbiqinizdə açıq şəkildə yazılmayan heç bir ifadə enjektə edilə bilməz. Hər şey `render`-dən öncə simli(string)-ə çevrilir və bu [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) hücumlarının qarşısını alır.
+React DOM JSX daxilində yerləşdirilmiş bütün ifadələri [escape](https://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-on-html) edir, yəni təhlükəsiz vəziyyət gətirir. Beləliklə, tətbiqinizdə açıq şəkildə yazılmayan heç bir ifadə enjektə edilə bilməz. Hər şey `render`-dən öncə simli(string)-ə çevrilir və bu [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) hücumlarının qarşısını alır.
### JSX Obyektləri təmsil edir {#jsx-represents-objects}
@@ -183,4 +183,4 @@ Sonrakı bölmədə DOM-a Reakt elementlərini render edilməyini araşdıracay
>**Məsləhət:**
>
->ES6 və JSX kodlarının daha yaxşı seçilməsi üçün editorunuzda ["Babel" language definition](http://babeljs.io/docs/editors)-dan istifadə etməyi məsləhət görürük. Bu səhifədə qeyd olunanla uyğunlaşan [Oceanic Next](https://labs.voronianski.com/oceanic-next-color-scheme/) rəngləndirməsindən istifadə olunur.
+>ES6 və JSX kodlarının daha yaxşı seçilməsi üçün editorunuzda ["Babel" language definition](https://babeljs.io/docs/editors)-dan istifadə etməyi məsləhət görürük. Bu səhifədə qeyd olunanla uyğunlaşan [Oceanic Next](https://labs.voronianski.com/oceanic-next-color-scheme/) rəngləndirməsindən istifadə olunur.
From f99cc73499384766407f9f1f191cff6aeb781075 Mon Sep 17 00:00:00 2001
From: Dan Abramov
Date: Sat, 23 Feb 2019 11:29:51 +0000
Subject: [PATCH 088/118] Revert "Small typo fix" (#1738)
* Revert "Small typo fix"
* Update hooks-faq.md
---
content/docs/hooks-faq.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md
index ea862cbce..b3b99de90 100644
--- a/content/docs/hooks-faq.md
+++ b/content/docs/hooks-faq.md
@@ -192,7 +192,7 @@ There are a few more heuristics, and they might change over time as we fine-tune
### How do lifecycle methods correspond to Hooks? {#how-do-lifecycle-methods-correspond-to-hooks}
-* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing is expensive, you can pass a function to `useState`.
+* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing the initial state is expensive, you can pass a function to `useState`.
* `getDerivedStateFromProps`: Schedule an update [while rendering](#how-do-i-implement-getderivedstatefromprops) instead.
From aa8adc49a7d50fadbcdedf4415cba3b5c1acccc4 Mon Sep 17 00:00:00 2001
From: santa claus
Date: Sat, 23 Feb 2019 08:15:32 -0500
Subject: [PATCH 089/118] Update getting-started.md >> "Online Playgrounds"
(#1733)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
adding a hello world template on glitch.com to the list of online playgrounds 🎏
---
content/docs/getting-started.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/docs/getting-started.md b/content/docs/getting-started.md
index 7f4c25f91..37972e83e 100644
--- a/content/docs/getting-started.md
+++ b/content/docs/getting-started.md
@@ -36,7 +36,7 @@ React has been designed from the start for gradual adoption, and **you can use a
### Online Playgrounds {#online-playgrounds}
-If you're interested in playing around with React, you can use an online code playground. Try a Hello World template on [CodePen](codepen://hello-world) or [CodeSandbox](https://codesandbox.io/s/new).
+If you're interested in playing around with React, you can use an online code playground. Try a Hello World template on [CodePen](codepen://hello-world), [CodeSandbox](https://codesandbox.io/s/new), or [Glitch](https://glitch.com/edit/#!/remix/starter-react-template).
If you prefer to use your own text editor, you can also [download this HTML file](https://raw.githubusercontent.com/reactjs/reactjs.org/master/static/html/single-file-example.html), edit it, and open it from the local filesystem in your browser. It does a slow runtime code transformation, so we'd only recommend using this for simple demos.
From 07253c8209f721bf5600bdac416f670aa598feb2 Mon Sep 17 00:00:00 2001
From: Brian Vaughn
Date: Sat, 23 Feb 2019 11:42:52 -0800
Subject: [PATCH 090/118] Add "Languages" page (#1691)
* Added language selector page
* PR nits
* Fix typo in variable name
* Added language icon. Show search icon in mobile.
* Tweaked header alignment
* Split languages into 3 categories based on progress:
complete, partially translated, and needs contributors
* Lower-cased pt-* language codes
* Re-added locale sort
* Renamed 'Partially Translated' header to 'In Progress'
---
content/languages.yml | 133 +++++++++++++++++++
src/components/LayoutHeader/DocSearch.js | 29 ++---
src/components/LayoutHeader/Header.js | 77 ++++++++++-
src/pages/languages.js | 159 +++++++++++++++++++++++
src/site-constants.js | 2 +-
5 files changed, 373 insertions(+), 27 deletions(-)
create mode 100644 content/languages.yml
create mode 100644 src/pages/languages.js
diff --git a/content/languages.yml b/content/languages.yml
new file mode 100644
index 000000000..7790945a8
--- /dev/null
+++ b/content/languages.yml
@@ -0,0 +1,133 @@
+# Status enums indicate what percentage of "core" content has been translated:
+# 0: Incomplete (0–49%)
+# 1: Partially complete (50–94%)
+# 2: Complete (95–100%)
+
+- name: English
+ translated_name: English
+ code: en
+ status: 2
+- name: Arabic
+ translated_name: العربية
+ code: ar
+ status: 0
+- name: Azerbaijani
+ translated_name: Azərbaycanca
+ code: az
+ status: 0
+- name: Bulgarian
+ translated_name: Български
+ code: bg
+ status: 0
+- name: Bengali
+ translated_name: বাংলা
+ code: bn
+ status: 0
+- name: German
+ translated_name: Deutsch
+ code: de
+ status: 0
+- name: Spanish
+ translated_name: Español
+ code: es
+ status: 2
+- name: Persian
+ translated_name: فارسی
+ code: fa
+ status: 0
+- name: French
+ translated_name: Français
+ code: fr
+ status: 0
+- name: Hebrew
+ translated_name: עברית
+ code: he
+ status: 0
+- name: Hindi
+ translated_name: हिन्दी
+ code: hi
+ status: 0
+- name: Armenian
+ translated_name: Հայերեն
+ code: hy
+ status: 0
+- name: Indonesian
+ translated_name: Bahasa Indonesia
+ code: id
+ status: 0
+- name: Italian
+ translated_name: Italiano
+ code: it
+ status: 0
+- name: Japanese
+ translated_name: 日本語
+ code: ja
+ status: 1
+- name: Korean
+ translated_name: 한국어
+ code: ko
+ status: 0
+- name: Malayalam
+ translated_name: മലയാളം
+ code: ml
+ status: 0
+- name: Nepali
+ translated_name: नेपाली
+ code: ne
+ status: 0
+- name: Dutch
+ translated_name: Nederlands
+ code: nl
+ status: 0
+- name: Polish
+ translated_name: Polski
+ code: pl
+ status: 0
+- name: Portuguese (Brazil)
+ translated_name: Português do Brasil
+ code: pt-br
+ status: 1
+- name: Portuguese (Portugal)
+ translated_name: Português europeu
+ code: pt-pt
+ status: 0
+- name: Romanian
+ translated_name: Română
+ code: ro
+ status: 0
+- name: Russian
+ translated_name: Русский
+ code: ru
+ status: 0
+- name: Sinhala
+ translated_name: සිංහල
+ code: si
+ status: 0
+- name: Tamil
+ translated_name: தமிழ்
+ code: ta
+ status: 0
+- name: Turkish
+ translated_name: Türkçe
+ code: tr
+ status: 0
+- name: Ukrainian
+ translated_name: Українська
+ code: uk
+ status: 0
+- name: Uzbek
+ translated_name: Oʻzbekcha
+ code: uz
+ status: 0
+- name: Vietnamese
+ translated_name: Tiếng Việt
+ code: vi
+ status: 0
+- name: Simplified Chinese
+ translated_name: 简体中文
+ code: zh-hans
+ status: 0
+- name: Traditional Chinese
+ translated_name: 繁體中文
+ code: zh-hant
+ status: 0
\ No newline at end of file
diff --git a/src/components/LayoutHeader/DocSearch.js b/src/components/LayoutHeader/DocSearch.js
index b31505917..a920a197a 100644
--- a/src/components/LayoutHeader/DocSearch.js
+++ b/src/components/LayoutHeader/DocSearch.js
@@ -42,27 +42,23 @@ class DocSearch extends Component<{}, State> {
flex: '0 0 auto',
flexDirection: 'row',
alignItems: 'center',
- paddingLeft: '0.5rem',
- paddingRight: '0.5rem',
+ paddingLeft: '0.25rem',
+ paddingRight: '0.25rem',
- [media.lessThan('small')]: {
- justifyContent: 'flex-end',
- },
[media.lessThan('large')]: {
+ justifyContent: 'flex-end',
marginRight: 10,
},
- [media.between('small', 'medium')]: {
- width: 'calc(100% / 3)',
- },
[media.between('medium', 'xlarge')]: {
- width: 'calc(100% / 6)',
+ //width: 'calc(100% / 6)',
},
- [media.greaterThan('small')]: {
- minWidth: 120,
+ [media.greaterThan('large')]: {
+ minWidth: 100,
},
}}>
{
fontWeight: 300,
fontFamily: 'inherit',
position: 'relative',
- padding: '5px 5px 5px 29px',
+ padding: '4px 4px 4px 29px',
backgroundImage: 'url(/search.svg)',
backgroundSize: '16px 16px',
backgroundRepeat: 'no-repeat',
backgroundPositionY: 'center',
- backgroundPositionX: '5px',
+ backgroundPositionX: '4px',
':focus': {
outline: 0,
@@ -86,11 +82,6 @@ class DocSearch extends Component<{}, State> {
[media.lessThan('large')]: {
fontSize: 16,
- },
- [media.greaterThan('small')]: {
- width: '100%',
- },
- [media.lessThan('small')]: {
width: '16px',
transition: 'width 0.2s ease, padding 0.2s ease',
paddingLeft: '16px',
@@ -104,7 +95,7 @@ class DocSearch extends Component<{}, State> {
}}
id="algolia-doc-search"
type="search"
- placeholder="Search docs"
+ placeholder="Search"
aria-label="Search docs"
/>
diff --git a/src/components/LayoutHeader/Header.js b/src/components/LayoutHeader/Header.js
index 55743a7c1..ca72e0802 100644
--- a/src/components/LayoutHeader/Header.js
+++ b/src/components/LayoutHeader/Header.js
@@ -92,6 +92,7 @@ const Header = ({location}: {location: Location}) => (