Skip to content

Commit 8aba29e

Browse files
committed
Translate 'Web Components'
1 parent f2189b4 commit 8aba29e

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

content/docs/nav.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
- id: uncontrolled-components
8181
title: Niekontrolowane komponenty
8282
- id: web-components
83-
title: Web Components
83+
title: Komponenty sieciowe
8484
- title: Dokumentacja API
8585
items:
8686
- id: react-api
@@ -127,7 +127,7 @@
127127
title: Hooki - FAQ
128128
- title: Testowanie
129129
items:
130-
- id: testing
130+
- id: testing
131131
title: Ogólne informacje
132132
- id: testing-recipes
133133
title: Przykłady i dobre praktyki

content/docs/web-components.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
22
id: web-components
3-
title: Web Components
3+
title: Komponenty sieciowe
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 i [komponenty sieciowe](https://developer.mozilla.org/pl/docs/Web/Web_Components) (ang. *Web Components*) zostały stworzone do rozwiązywania różnych problemów. Komponenty sieciowe zapewniają silną enkapsulację w celu wielokrotnego użytku, a React jest deklaratywną biblioteką stworzoną do synchronizacji danych z modelem DOM. Te dwa cele się dopełniają. Jako deweloper możesz wykorzystywać Reacta w swoich komponentach sieciowych lub wykorzystywać komponenty sieciowe w Reakcie.
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+
Większość osób korzystających z Reacta nie używa komponentów sieciowych, ale ty możesz chcieć to zrobić, zwłaszcza jeśli używasz zewnętrznych komponentów UI napisanych z wykorzystaniem komponentów sieciowych.
1212

13-
## Using Web Components in React {#using-web-components-in-react}
13+
## Używanie komponentów sieciowych w Reakcie {#using-web-components-in-react}
1414

1515
```javascript
1616
class HelloMessage extends React.Component {
1717
render() {
18-
return <div>Hello <x-search>{this.props.name}</x-search>!</div>;
18+
return <div>Witaj, <x-search>{this.props.name}</x-search>!</div>;
1919
}
2020
}
2121
```
2222

23-
> Note:
23+
> Uwaga:
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+
> Komponenty sieciowe często udostępniają imperatywne API. Na przykład: komponent sieciowy `video` może udostępniać funkcje `play()` i `pause()`. Aby skorzystać z imperatywnego API komponentu sieciowego, możesz potrzebować użyć referencji (`ref`), aby nawiązać bezpośredni kontakt z węzłem drzewa DOM. Jeśli korzystasz z komponentów sieciowych innych osób, najlepszym rozwiązaniem będzie utworzenie reactowego komponentu służącego jako nakładka dla komponentu sieciowego.
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+
> Zdarzenia emitowane przez komponent sieciowy mogą niewłaściwie propagować się przez reactowe drzewo renderowania.
28+
> Aby obsłużyć te zdarzenia w komponencie reactowym, konieczne może być ręczne dodanie procedur obsługi zdarzeń.
2929
30-
One common confusion is that Web Components use "class" instead of "className".
30+
Często mylonym aspektem komponentów sieciowych jest to, że korzystają z atrybutu "class", a nie "className".
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+
## Używanie Reacta w komponentach sieciowych {#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+
> Uwaga:
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/polyfills/tree/master/packages/webcomponentsjs#custom-elements-es5-adapterjs) before you load your web components to fix this issue.
61+
> Ten kod **nie** zadziała, jeśli dokonujesz transformacji klas używając narzędzia Babel. Zobacz [dyskusję](https://github.com/w3c/webcomponents/issues/587) na ten temat, aby dowiedzieć się więcej.
62+
> Aby rozwiązać ten problem, użyj [custom-elements-es5-adapter](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs#custom-elements-es5-adapterjs) przed załadowaniem komponentów sieciowych.

0 commit comments

Comments
 (0)