Translate 'special-props' warning page#90
Merged
jakubdrozdek merged 1 commit intoreactjs:masterfrom May 16, 2019
Merged
Conversation
94 tasks
|
Deploy preview for pl-reactjs ready! Built with commit 6d4d0a1 |
jfrej
reviewed
May 15, 2019
| Większość właściwości (ang. *props*) elementów jest przekazywanych do komponentu. Istnieją jednak dwie specjalne właściwości (`ref` oraz `key`), których używa na wyłączność React, a co za tym idzie, nie trafiają do komponentu. | ||
|
|
||
| For instance, attempting to access `this.props.key` from a component (i.e., the render function or [propTypes](/docs/typechecking-with-proptypes.html#proptypes)) is not defined. If you need to access the same value within the child component, you should pass it as a different prop (ex: `<ListItemWrapper key={result.id} id={result.id} />`). While this may seem redundant, it's important to separate app logic from reconciling hints. | ||
| Na przykład, próba odczytania wartości `this.props.key` w komponencie (w funkcji renderującej lub [propTypes](/docs/typechecking-with-proptypes.html#proptypes)) zakończy się niepowodzeniem. Jeśli potrzebujesz odczytać taką wartość w komponencie potomnym, przekaż ją ponownie pod inną nazwą (np. `<ListItemWrapper key={result.id} id={result.id} />`). Nawet jeśli wydaje się to nadmiarowe, ważne jest, aby oddzielać logikę aplikacji od wskazówek rekoncyliacyjnych (ang. *reconciling hints*). |
There was a problem hiding this comment.
"Nadmiarowe" trochę dziwnie mi tutaj brzmi. Może lepiej:
Nawet jeśli wydaje się to zbyteczne
Member
Author
There was a problem hiding this comment.
W oryginale było "redundant", co zwykle tłumaczy się w ten sposób. Niektórzy piszą "redundantne", ale brzmi to dla mnie dziwacznie.
Ale "zbyteczne" też ok :-)
cvqprs
approved these changes
May 16, 2019
jfrej
approved these changes
May 16, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.