Skip to content

Commit 46618a5

Browse files
committed
Merge remote-tracking branch 'upstream/master' into translate-forwarding-refs
2 parents 56a474d + a89df33 commit 46618a5

File tree

16 files changed

+4431
-2762
lines changed

16 files changed

+4431
-2762
lines changed

TRANSLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ReactDOM.işle(bileşen, document.idKullanarakElemanıGetir('kök'));
7575

7676
## Dış Bağlantılar
7777

78-
Sayfada yer alan [MDN] veya [Wikipedia] gibi harici bağlantılar diğer bir makaleye yönelikse ve bu makalenin Türkçe dilinde kabul edilebilir kalitede bir sürümü varsa, bağlantıyı bu sürümünkiyle değiştirmeyi düşününüz. Ayrıca Wikipedia Türkiye'de uzun süredir yasaklı olduğu için, Wikipedia linklerini [MDN] veya [EksiSozluk] gibi tanınmış sitelerdeki versiyonları ile değiştirebilirsiniz.
78+
Sayfada yer alan [MDN] veya [Wikipedia] gibi harici bağlantılar diğer bir makaleye yönelikse ve bu makalenin Türkçe dilinde kabul edilebilir kalitede bir sürümü varsa, bağlantıyı bu sürümünkiyle değiştirmeyi düşününüz.
7979

8080
[MDN]: https://developer.mozilla.org/en-US/
8181
[Wikipedia]: https://en.wikipedia.org/wiki/Main_Page

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ It also offers full support for React Hooks, including inspecting nested objects
2323
* `16.x`: Supported
2424

2525
**`react-native`**
26-
* `0`-`0.61`: Not supported
27-
* `0.62`: Will be supported (when 0.62 is released)
26+
* `0`-`0.61.x`: Not supported
27+
* `0.62`: Supported
2828

2929
## How do I get the new DevTools? {#how-do-i-get-the-new-devtools}
3030

content/community/examples.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ React topluluğu tarafından yaratılmış pek çok proje mevcut. Bu sayfada, ü
1010

1111
Siz de kendi projenizi eklemekten çekinmeyin. Eğer bir proje eklerseniz, lütfen projenizin React'in en güncel sürümleriyle uyumlu olmasını sağladığınızdan emin olun.
1212

13-
## Small Examples
13+
## Small Examples {#small-examples}
1414

1515
* **[Zeldog](https://yannsainty.github.io/Zeldog/)** Bir köpeğin daha fazla pizza yemek için ördeklerle savaştığı, Zelda benzeri bir oyun.
1616
* **[Hesap Makinesi](https://github.com/ahfarmer/calculator)** iOS hesap makinesinin React ile uygulanmış hali
@@ -33,7 +33,6 @@ Siz de kendi projenizi eklemekten çekinmeyin. Eğer bir proje eklerseniz, lütf
3333
* **[Counter App](https://github.com/arnab-datta/counter-app)** A small shopping cart example
3434
* **[Tutorial Solutions](https://github.com/harman052/react-tutorial-solutions)** Solutions to challenges mentioned at the end of React tutorial
3535

36-
## Complete Apps
36+
## Complete Apps {#complete-apps}
3737

38-
* **[Hacker News Clone React/GraphQL](https://github.com/clintonwoo/hackernews-react-graphql)** Hacker News clone rewritten with universal JavaScript, using React and GraphQL
3938
* **[Builder Book](https://github.com/builderbook/builderbook)** Open-source web app to write and host documentation or sell books. Built with React, Material-UI, Next, Express, Mongoose, MongoDB

content/docs/code-splitting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ console.log(add(16, 26)); // 42
4040
>
4141
> Paketleriniz bundan çok daha farklı gözükecektir.
4242
43-
Eğer [Create React App](https://github.com/facebookincubator/create-react-app),
44-
[Next.js](https://github.com/zeit/next.js/), [Gatsby](https://www.gatsbyjs.org/)
43+
Eğer [Create React App](https://create-react-app.dev/),
44+
[Next.js](https://nextjs.org/), [Gatsby](https://www.gatsbyjs.org/)
4545
ya da benzeri bir araç kullanıyorsanız, uygulamanızı paketleyen bir Webpack
4646
kurulumuna sahip olursunuz.
4747

content/docs/codebase-overview.md

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,11 @@ For example, a test for [`setInnerHTML.js`](https://github.com/facebook/react/bl
3535

3636
### Warnings and Invariants {#warnings-and-invariants}
3737

38-
The React codebase uses the `warning` module to display warnings:
38+
The React codebase uses `console.error` to display warnings:
3939

4040
```js
41-
var warning = require('warning');
42-
43-
warning(
44-
2 + 2 === 4,
45-
'Math is not working today.'
46-
);
47-
```
48-
49-
**The warning is shown when the `warning` condition is `false`.**
50-
51-
One way to think about it is that the condition should reflect the normal situation rather than the exceptional one.
52-
53-
It is a good idea to avoid spamming the console with duplicate warnings:
54-
55-
```js
56-
var warning = require('warning');
57-
58-
var didWarnAboutMath = false;
59-
if (!didWarnAboutMath) {
60-
warning(
61-
2 + 2 === 4,
62-
'Math is not working today.'
63-
);
64-
didWarnAboutMath = true;
41+
if (__DEV__) {
42+
console.error('Something is wrong.');
6543
}
6644
```
6745

@@ -114,39 +92,6 @@ ReactRef.detachRefs = function(
11492
When possible, new code should use Flow annotations.
11593
You can run `yarn flow` locally to check your code with Flow.
11694

117-
### Dynamic Injection {#dynamic-injection}
118-
119-
React uses dynamic injection in some modules. While it is always explicit, it is still unfortunate because it hinders understanding of the code. The main reason it exists is because React originally only supported DOM as a target. React Native started as a React fork. We had to add dynamic injection to let React Native override some behaviors.
120-
121-
You may see modules declaring their dynamic dependencies like this:
122-
123-
```js
124-
// Dynamically injected
125-
var textComponentClass = null;
126-
127-
// Relies on dynamically injected value
128-
function createInstanceForText(text) {
129-
return new textComponentClass(text);
130-
}
131-
132-
var ReactHostComponent = {
133-
createInstanceForText,
134-
135-
// Provides an opportunity for dynamic injection
136-
injection: {
137-
injectTextComponentClass: function(componentClass) {
138-
textComponentClass = componentClass;
139-
},
140-
},
141-
};
142-
143-
module.exports = ReactHostComponent;
144-
```
145-
146-
The `injection` field is not handled specially in any way. But by convention, it means that this module wants to have some (presumably platform-specific) dependencies injected into it at runtime.
147-
148-
There are multiple injection points in the codebase. In the future, we intend to get rid of the dynamic injection mechanism and wire up all the pieces statically during the build.
149-
15095
### Multiple Packages {#multiple-packages}
15196

15297
React is a [monorepo](https://danluu.com/monorepo/). Its repository contains multiple separate packages so that their changes can be coordinated together, and issues live in one place.
@@ -211,9 +156,7 @@ Its source code is located in [`packages/react-reconciler`](https://github.com/f
211156

212157
### Event System {#event-system}
213158

214-
React implements a synthetic event system which is agnostic of the renderers and works both with React DOM and React Native. Its source code is located in [`packages/legacy-events`](https://github.com/facebook/react/tree/master/packages/legacy-events).
215-
216-
There is a [video with a deep code dive into it](https://www.youtube.com/watch?v=dRo_egw7tBc) (66 mins).
159+
React implements a layer over native events to smooth out cross-browser differences. Its source code is located in [`packages/react-dom/src/events`](https://github.com/facebook/react/tree/master/packages/react-dom/src/events).
217160

218161
### What Next? {#what-next}
219162

content/docs/hooks-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function FriendListItem(props) {
229229
}
230230
```
231231

232-
Bu bileşenlerin state'leri birbirinden tamamen bağımsızdır. Hooklar *state'le alakalı davranışların* tekrar kullanılmasının bir yoludur, state'in yeniden kullanılmasıyla alakalı değildir. Hatta bir Hook her çağırıldığında tamamen ayrı bir state'e sahiptir -- bu sayede özel Hook'unuzu bir bileşen içerisinde iki kere çağırabilirsiniz.
232+
Her bileşenin state'i birbirinden tamamen bağımsızdır. Hooklar *state'le alakalı davranışların* tekrar kullanılmasının bir yoludur, state'in yeniden kullanılmasıyla alakalı değildir. Hatta bir Hook her çağırıldığında tamamen ayrı bir state'e sahiptir -- bu sayede özel Hook'unuzu bir bileşen içerisinde iki kere çağırabilirsiniz.
233233

234234
Özel Hook'larınız bir özellikten daha çok bir kural gibidir. Eğer bir fonksiyonun adı "`use`" ile başlıyor ve başka Hook'ları çağırıyorsa, bu fonksiyon bir özel Hook'tur diyoruz. `useSomething` adlandırması linter eklentimizin, Hook kullanılarak yazılan kodda bugları bulmasını sağlıyor.
235235

content/docs/release-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Denemeye karşı entegrasyon testleri yapmayı değerli bulabilirsiniz. Bu size
9494

9595
#### Deneysel Özellikler Hakkında Nasıl Daha Fazla Bilgi Edinebilirim? {#how-can-i-learn-more-about-experimental-features}
9696

97-
Deneysel özellikler belgelenebilir veya belgelenmeyebilir. Genellikle, deneyler Sonraki veya İstikrarlı'ya gönderime yakın olana kadar belgelenmez.
97+
Deneysel özellikler belgelenebilir veya belgelenmeyebilir. Genellikle, deneyler Sonrakine veya En yeni'ye gönderime yakın olana kadar belgelenmez.
9898

9999
Bir özellik belgelenmezse, bir [RFC](https://github.com/reactjs/rfcs) eşlik edebilir.
100100

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*/
4+
5+
declare module 'gatsby-plugin-google-analytics' {
6+
declare module.exports: {
7+
trackCustomEvent: (...params: any) => void,
8+
};
9+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"unist-util-visit": "^1.1.3"
5959
},
6060
"engines": {
61-
"node": "12.x.x",
61+
"node": "12.x.x || 14.x.x",
6262
"yarn": "^1.3.2"
6363
},
6464
"homepage": "https://tr.reactjs.org/",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* @emails react-core
5+
* @flow
6+
*/
7+
8+
// $FlowExpectedError
9+
import React, {useState} from 'react';
10+
import {trackCustomEvent} from 'gatsby-plugin-google-analytics';
11+
import {sharedStyles} from 'theme';
12+
13+
const FeedbackForm = () => {
14+
const [feedbackGiven, setFeedbackGiven] = useState(false);
15+
16+
if (feedbackGiven) {
17+
return 'Thanks for letting us know!';
18+
} else {
19+
return (
20+
<span>
21+
Is this page useful?
22+
<button
23+
css={[sharedStyles.articleLayout.feedbackButton, {marginLeft: '6px'}]}
24+
aria-label="Yes"
25+
onClick={e => {
26+
e.preventDefault();
27+
trackCustomEvent({
28+
category: 'Feedback Button',
29+
action: 'feedback',
30+
label: window.location.pathname,
31+
value: 1,
32+
});
33+
setFeedbackGiven(true);
34+
}}>
35+
<svg
36+
css={{
37+
transform: 'translateY(0.1em)',
38+
}}
39+
focusable="false"
40+
xmlns="http://www.w3.org/2000/svg"
41+
viewBox="0 0 81.13 89.76">
42+
<path d="M22.9 6a18.57 18.57 0 002.67 8.4 25.72 25.72 0 008.65 7.66c3.86 2 8.67 7.13 13.51 11 3.86 3.11 8.57 7.11 11.54 8.45s13.59.26 14.64 1.17c1.88 1.63 1.55 9-.11 15.25-1.61 5.86-5.96 10.55-6.48 16.86-.4 4.83-2.7 4.88-10.93 4.88h-1.35c-3.82 0-8.24 2.93-12.92 3.62a68 68 0 01-9.73.5c-3.57 0-7.86-.08-13.25-.08-3.56 0-4.71-1.83-4.71-4.48h8.42a3.51 3.51 0 000-7H12.28a2.89 2.89 0 01-2.88-2.88 1.91 1.91 0 01.77-1.78h16.46a3.51 3.51 0 000-7H12.29c-3.21 0-4.84-1.83-4.84-4a6.41 6.41 0 011.17-3.78h19.06a3.5 3.5 0 100-7H9.75A3.51 3.51 0 016 42.27a3.45 3.45 0 013.75-3.48h13.11c5.61 0 7.71-3 5.71-5.52-4.43-4.74-10.84-12.62-11-18.71-.15-6.51 2.6-7.83 5.36-8.56m0-6a6.18 6.18 0 00-1.53.2c-6.69 1.77-10 6.65-9.82 14.5.08 5.09 2.99 11.18 8.52 18.09H9.74a9.52 9.52 0 00-6.23 16.9 12.52 12.52 0 00-2.07 6.84 9.64 9.64 0 003.65 7.7 7.85 7.85 0 00-1.7 5.13 8.9 8.9 0 005.3 8.13 6 6 0 00-.26 1.76c0 6.37 4.2 10.48 10.71 10.48h13.25a73.75 73.75 0 0010.6-.56 35.89 35.89 0 007.58-2.18 17.83 17.83 0 014.48-1.34h1.35c4.69 0 7.79 0 10.5-1 3.85-1.44 6-4.59 6.41-9.38.2-2.46 1.42-4.85 2.84-7.62a41.3 41.3 0 003.42-8.13 48 48 0 001.59-10.79c.1-5.13-1-8.48-3.35-10.55-2.16-1.87-4.64-1.87-9.6-1.88a46.86 46.86 0 01-6.64-.29c-1.92-.94-5.72-4-8.51-6.3l-1.58-1.28c-1.6-1.3-3.27-2.79-4.87-4.23-3.33-3-6.47-5.79-9.61-7.45a20.2 20.2 0 01-6.43-5.53 12.44 12.44 0 01-1.72-5.36 6 6 0 00-6-5.86z" />
43+
</svg>
44+
</button>
45+
<button
46+
css={[sharedStyles.articleLayout.feedbackButton, {marginLeft: '3px'}]}
47+
aria-label="No"
48+
onClick={e => {
49+
e.preventDefault();
50+
trackCustomEvent({
51+
category: 'Feedback Button',
52+
action: 'feedback',
53+
label: window.location.pathname,
54+
value: 0,
55+
});
56+
}}>
57+
<svg
58+
css={{
59+
transform: 'scale(-1, -1) translateY(-.6em)',
60+
}}
61+
xmlns="http://www.w3.org/2000/svg"
62+
viewBox="0 0 81.13 89.76">
63+
<path d="M22.9 6a18.57 18.57 0 002.67 8.4 25.72 25.72 0 008.65 7.66c3.86 2 8.67 7.13 13.51 11 3.86 3.11 8.57 7.11 11.54 8.45s13.59.26 14.64 1.17c1.88 1.63 1.55 9-.11 15.25-1.61 5.86-5.96 10.55-6.48 16.86-.4 4.83-2.7 4.88-10.93 4.88h-1.35c-3.82 0-8.24 2.93-12.92 3.62a68 68 0 01-9.73.5c-3.57 0-7.86-.08-13.25-.08-3.56 0-4.71-1.83-4.71-4.48h8.42a3.51 3.51 0 000-7H12.28a2.89 2.89 0 01-2.88-2.88 1.91 1.91 0 01.77-1.78h16.46a3.51 3.51 0 000-7H12.29c-3.21 0-4.84-1.83-4.84-4a6.41 6.41 0 011.17-3.78h19.06a3.5 3.5 0 100-7H9.75A3.51 3.51 0 016 42.27a3.45 3.45 0 013.75-3.48h13.11c5.61 0 7.71-3 5.71-5.52-4.43-4.74-10.84-12.62-11-18.71-.15-6.51 2.6-7.83 5.36-8.56m0-6a6.18 6.18 0 00-1.53.2c-6.69 1.77-10 6.65-9.82 14.5.08 5.09 2.99 11.18 8.52 18.09H9.74a9.52 9.52 0 00-6.23 16.9 12.52 12.52 0 00-2.07 6.84 9.64 9.64 0 003.65 7.7 7.85 7.85 0 00-1.7 5.13 8.9 8.9 0 005.3 8.13 6 6 0 00-.26 1.76c0 6.37 4.2 10.48 10.71 10.48h13.25a73.75 73.75 0 0010.6-.56 35.89 35.89 0 007.58-2.18 17.83 17.83 0 014.48-1.34h1.35c4.69 0 7.79 0 10.5-1 3.85-1.44 6-4.59 6.41-9.38.2-2.46 1.42-4.85 2.84-7.62a41.3 41.3 0 003.42-8.13 48 48 0 001.59-10.79c.1-5.13-1-8.48-3.35-10.55-2.16-1.87-4.64-1.87-9.6-1.88a46.86 46.86 0 01-6.64-.29c-1.92-.94-5.72-4-8.51-6.3l-1.58-1.28c-1.6-1.3-3.27-2.79-4.87-4.23-3.33-3-6.47-5.79-9.61-7.45a20.2 20.2 0 01-6.43-5.53 12.44 12.44 0 01-1.72-5.36 6 6 0 00-6-5.86z" />
64+
</svg>
65+
</button>
66+
</span>
67+
);
68+
}
69+
};
70+
71+
export default FeedbackForm;

0 commit comments

Comments
 (0)