Skip to content

Translate 'Shallow Renderer' page #24

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

Merged
merged 2 commits into from
Mar 4, 2019

Conversation

jakubdrozdek
Copy link
Member

No description provided.

@jakubdrozdek jakubdrozdek added the needs review A pull request ready to be reviewed label Feb 21, 2019
@netlify
Copy link

netlify bot commented Feb 21, 2019

Deploy preview for pl-reactjs ready!

Built with commit abcba57

https://deploy-preview-24--pl-reactjs.netlify.com

@jakubdrozdek jakubdrozdek force-pushed the addons-shallow-renderer branch from 20e1d3a to b14fddb Compare February 21, 2019 23:57
@jakubdrozdek jakubdrozdek force-pushed the addons-shallow-renderer branch from b14fddb to db23829 Compare February 22, 2019 22:53
@jakubdrozdek jakubdrozdek added this to the Core Pages milestone Feb 24, 2019
Copy link
Member

@cvqprs cvqprs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@cvqprs cvqprs added the needs +1 Needs another approval before merging label Feb 28, 2019

When writing unit tests for React, shallow rendering can be helpful. Shallow rendering lets you render a component "one level deep" and assert facts about what its render method returns, without worrying about the behavior of child components, which are not instantiated or rendered. This does not require a DOM.
Podczas pisania testów jednostkowych dla kodu reactowego przydatne może okazać się renderowanie płytkie (ang. *shallow rendering*). Pozwala ono na wyrenderowanie komponentu "jeden poziom w głąb" i wykonanie sprawdzeń na zwróconym drzewie, bez obaw o efekty uboczne komponentów potomnych, które wcale nie są tworzone i renderowane. Proces ten nie wymaga obecności drzewa DOM.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. asercji zamiast sprawdzeń
  2. Skąd tłumaczenie behavior na efekty uboczne?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Ok, zmienione zgodnie z naszymi ustaleniami.
  2. Dlatego że nie pasuje mi sformułowanie: "bez obaw o zachowanie komponentów". Chodzi tutaj o to, że kiedy testujemy przy użyciu płytkiego renderowania, wszelkiej maści calle do backendu czy modyfikacje czegokolwiek nie nastąpią, bo komponenty potomne nie zostaną w ogóle wyrenderowane - tylko ich "szkic". Uważasz, że "zachowanie" by tu lepiej pasowało?

Copy link
Contributor

@g12i g12i Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To tylko mój konflikt wewnętrzny, kiedy odbiegamy od oryginału ;). Obawiam się, że używamy sformułowania "efekty uboczne", bez dalszego wyjaśnienia, co one oznaczają. Z drugiej strony chyba możemy założyć, że API Reference czytają zaawansowani użytkownicy. Więc nie wiem, co powiedzieć. Przemyśl mój argument, tymczasem z mojej strony 👍 .

Copy link
Member Author

@jakubdrozdek jakubdrozdek Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Przespałem się z tym i może być też "zachowanie". Nie kłuje mnie to już tak w oczy, jak ostatnio :D Ale żeby już nie przedłużać, zostawię jak jest. Najwyżej przy "wielkim czytaniu" (jak już skończymy tłumaczyć i zaczniemy sprawdzać całość "na prodzie") ktoś to wyhaczy i zmienimy.

@jakubdrozdek jakubdrozdek added 🌐 translated Translation is completed for this page and removed needs +1 Needs another approval before merging needs review A pull request ready to be reviewed labels Mar 4, 2019
@jakubdrozdek jakubdrozdek merged commit dfa8309 into reactjs:master Mar 4, 2019
@jakubdrozdek jakubdrozdek deleted the addons-shallow-renderer branch March 4, 2019 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌐 translated Translation is completed for this page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants