You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/web-components.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
2
id: web-components
3
-
title: Web Components
3
+
title: Web Bileşenleri
4
4
permalink: docs/web-components.html
5
5
redirect_from:
6
6
- "docs/webcomponents.html"
7
7
---
8
8
9
-
React and[Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)are built to solve different problems. Web Components provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. The two goals are complementary. As a developer, you are free to use React in your Web Components, or to use Web Components in React, or both.
9
+
React ve[Web Bileşenleri](https://developer.mozilla.org/en-US/docs/Web/Web_Components)farklı sorunları çözmek için oluşturulmuştur. React, DOM ile verilerinizi senkronize eden bir bildirimsel kitaplık sunarken, Web Bileşenleri yeniden kullanılabilir bileşenler için güçlü bir kapsülleme sağlar. İkisinin de amaçları birbirini tamamlar. Bir geliştirici olarak, Web Bileşenleri'nde React'i, React'te Web Bileşenleri'ni veya her ikisini de kullanmakta serbestsiniz.
10
10
11
-
Most people who use React don't use Web Components, but you may want to, especially if you are using third-party UI components that are written using Web Components.
11
+
React kullanan çoğu kişi Web Bileşenleri'ni kullanmaz, ancak özellikle Web Bileşenleri kullanılarak yazılmış üçüncü-taraf UI bileşenleri kullanıyorsanız kullanmak isteyebilirsiniz.
12
12
13
-
## Using Web Components in React {#using-web-components-in-react}
13
+
## Web Bileşenleri'ni React'te Kullanmak {#using-web-components-in-react}
14
14
15
15
```javascript
16
16
classHelloMessageextendsReact.Component {
@@ -20,14 +20,14 @@ class HelloMessage extends React.Component {
20
20
}
21
21
```
22
22
23
-
> Note:
23
+
> Not:
24
24
>
25
-
> Web Components often expose an imperative API. For instance, a`video` Web Component might expose `play()`and`pause()`functions. To access the imperative APIs of a Web Component, you will need to use a ref to interact with the DOM node directly. If you are using third-party Web Components, the best solution is to write a React component that behaves as a wrapper for your Web Component.
25
+
> Web Bileşenleri çoğu zaman zorunlu bir API ortaya çıkarır. Örneğin, bir`video` Web Bileşeni `play()`ve`pause()`fonksiyonlarını ortaya çıkarabilir. Bir Web Bileşeni'nin zorunlu API'lerine erişmek için DOM düğümüyle doğrudan etkileşimde bulunmak için bir ref kullanmanız gerekir. Üçüncü-taraf Web Bileşenleri kullanıyorsanız, en iyi çözüm Web Bileşeni'niz için sarıcı olarak çalışacak bir React bileşeni yazmaktır.
26
26
>
27
-
> Events emitted by a Web Component may not properly propagate through a React render tree.
28
-
> You will need to manually attach event handlers to handle these events within your React components.
27
+
> Bir Web Bileşeni tarafından yayınlanan olaylar, React render ağacı boyunca uygun bir şekilde yayılmayabilir.
28
+
> Bu olayları React bileşenleriniz içerisinde yönetmek için olay yöneticilerini el ile eklemeniz gerekir.
29
29
30
-
One common confusion is that Web Components use "class" instead of "className".
30
+
Yaygın karışıklıklardan biri, Web Bileşenleri'nin "className" yerine "class" kullanmasıdır.
31
31
32
32
```javascript
33
33
functionBrickFlipbox() {
@@ -40,7 +40,7 @@ function BrickFlipbox() {
40
40
}
41
41
```
42
42
43
-
## Using React in your Web Components {#using-react-in-your-web-components}
43
+
## React'i Web Bileşenleri'nizde Kullanmak {#using-react-in-your-web-components}
44
44
45
45
```javascript
46
46
classXSearchextendsHTMLElement {
@@ -56,7 +56,7 @@ class XSearch extends HTMLElement {
56
56
customElements.define('x-search', XSearch);
57
57
```
58
58
59
-
>Note:
59
+
>Not:
60
60
>
61
-
>This code **will not** work if you transform classes with Babel. See [this issue](https://github.com/w3c/webcomponents/issues/587)for the discussion.
62
-
>Include the [custom-elements-es5-adapter](https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs)before you load your web components to fix this issue.
61
+
>Sınıfları Babel ile dönüştürürseniz, bu kod **çalışmayacaktır**. Sorun için [bu konuya](https://github.com/w3c/webcomponents/issues/587)bakınız.
62
+
>Bu sorunu düzeltmek için web bileşenlerinizi yüklemeden önce [custom-elements-es5-adapter](https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs)ekleyin.
0 commit comments