Skip to content

Commit aefc5fc

Browse files
committed
Translates web-components
1 parent b6ef51a commit aefc5fc

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

content/docs/web-components.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
id: web-components
3-
title: Web Components
3+
title: Web Bileşenleri
44
permalink: docs/web-components.html
55
redirect_from:
66
- "docs/webcomponents.html"
77
---
88

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.
1010

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.
1212

13-
## Using Web Components in React {#using-web-components-in-react}
13+
## Web Bileşenleri'ni React'te Kullanmak {#using-web-components-in-react}
1414

1515
```javascript
1616
class HelloMessage extends React.Component {
@@ -20,14 +20,14 @@ class HelloMessage extends React.Component {
2020
}
2121
```
2222

23-
> Note:
23+
> Not:
2424
>
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.
2626
>
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.
2929
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.
3131

3232
```javascript
3333
function BrickFlipbox() {
@@ -40,7 +40,7 @@ function BrickFlipbox() {
4040
}
4141
```
4242

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}
4444

4545
```javascript
4646
class XSearch extends HTMLElement {
@@ -56,7 +56,7 @@ class XSearch extends HTMLElement {
5656
customElements.define('x-search', XSearch);
5757
```
5858

59-
>Note:
59+
> Not:
6060
>
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

Comments
 (0)