-
Notifications
You must be signed in to change notification settings - Fork 54
Translate React.Component
page
#47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploy preview for pl-reactjs ready! Built with commit 4364cda |
Update React Router render func URL
Co-Authored-By: cvqprs <[email protected]>
Translate 'Introducing JSX' page.
Translate 'React API'
Collaborated with @WojciechDanowski
Co-Authored-By: WojciechDanowskii <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dodałem kilka komentarzy. Bardzo dobra robota. 👍
4. React DOM efficiently updates the DOM to match `<h1>Hello, Sara</h1>`. | ||
1. Wywołujemy `ReactDOM.render()` z elementem `<Welcome name="Sara" />`. | ||
2. React wywołuje komponent `Welcome` z właściwościami `{name: 'Sara'}`. | ||
3. Nasz komponent `Welcome` jako wynik zwraca element `<h1>Cześć, Sara</h1>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Nasz komponent `Welcome` jako wynik zwraca element `<h1>Cześć, Sara</h1>`. | |
3. Nasz komponent `Welcome`, zwraca jako wynik element `<h1>Cześć, Sara</h1>`. |
> | ||
>To learn more about the reasoning behind this convention, please read [JSX In Depth](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized). | ||
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [dogłębną analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [dogłębną analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized). | |
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [szczegółową analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized). |
> | ||
>React treats components starting with lowercase letters as DOM tags. For example, `<div />` represents an HTML div tag, but `<Welcome />` represents a component and requires `Welcome` to be in scope. | ||
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` było w zasięgu (ang. *scope*). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` było w zasięgu (ang. *scope*). | |
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` był w zasięgu (ang. *scope*). |
@@ -233,30 +233,30 @@ function Comment(props) { | |||
|
|||
[](codepen://components-and-props/extracting-components-continued) | |||
|
|||
Extracting components might seem like grunt work at first, but having a palette of reusable components pays off in larger apps. A good rule of thumb is that if a part of your UI is used several times (`Button`, `Panel`, `Avatar`), or is complex enough on its own (`App`, `FeedStory`, `Comment`), it is a good candidate to be a reusable component. | |||
Wyciąganie komponentów może z początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyczną zasadą jest, że jeśli część twojego interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`), jest ona dobrym kandydatem do stania się komponentem wielokrotnego użytku. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wyciąganie komponentów może z początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyczną zasadą jest, że jeśli część twojego interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`), jest ona dobrym kandydatem do stania się komponentem wielokrotnego użytku. | |
Wyciąganie komponentów może na początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyką jest tworzenie komponentów wielokrotnego użytku, jeśli część interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`). |
function handleStatusChange(status) { | ||
setIsOnline(status.isOnline); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Nie bardzo rozumiem dlaczego przeniosłeś tę funkcję do środka useEffect
? Raczej nie zmieniamy kodu, jedynie nanosimy tłumaczenie.
useEffect(() => { | ||
function handleStatusChange(status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To samo co wyżej.
useEffect(() => { | ||
function handleStatusChange(status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To samo co wyżej.
|
||
In the example below, we embed the result of calling a JavaScript function, `formatName(user)`, into an `<h1>` element. | ||
W poniższym przykładzie umiejscawiamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W poniższym przykładzie umiejscawiamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`: | |
W poniższym przykładzie umieszczamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`: |
@bartlomiejzuber Te pliki, do których masz uwagi nie są częścią tego PRa. Te zmiany wynikają z tego, że zrobiłem (bezsensownie) rebase tego brancha. Zmianom w tym PRze uległ głównie plik content/docs/reference-react-component.md i pliki w nim zaembedowane. Chyba otworzę nowego PRa, w którym będą tylko moje zmiany dla przejrzystości. Sory za kłopot. |
Otworzyłem nowy PR do tej strony #71 |
This is the translation for the 'React.Component' page in API reference.