-
Notifications
You must be signed in to change notification settings - Fork 312
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
Translate Render Props #94
Translate Render Props #94
Conversation
Acho que os comentários dos exemplos poderiam ser traduzidos também, para ajudar no entendimento 😄 |
Não tinha lembrado deles 😐 Mas traduzi agora e também corrigi as sugestões acima 😄 |
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.
@italotabatinga Muito obrigado.
|
||
Using a render prop can negate the advantage that comes from using [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) if you create the function inside a `render` method. This is because the shallow prop comparison will always return `false` for new props, and each `render` in this case will generate a new value for the render prop. | ||
Usar uma _render prop_ pode anular a vantagem de utilizar [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) se você criar uma função dentro de um método `render`. Isso se deve à comparação superficial de _prop_ sempre retornar `false` para novas _props_, e, nesse caso, cada `render` vai gerar um novo valor para a _render prop_. |
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.
Esse é um dos casos que eu me pergunto se não valeria a pena colocar o termo em ingles também, para facilitar a googlada marota.
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.
Qual seria o termo? Shallow Prop Comparison
?
|
||
```js | ||
Mouse.propTypes = { | ||
children: PropTypes.func.isRequired | ||
}; | ||
``` | ||
|
||
## Caveats {#caveats} | ||
## Avisos {#caveats} |
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.
Acho que poderiamos adicionar no glossario.
@michellocana se estiver bom pra ti eu mergeio este:) |
@eduardomoroni me parece bom, podemos dar merge 😄 |
@michellocana tu podes aprovas o PR? O merge ta bloqueado até ter 2 aproves 👍 |
Ops, parece que eu posso burlar isso. |
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.
SGTM 😄
Tradução da página Render Props
Vale a pena dar uma olhada