Uh oh!
There was an error while loading. Please reload this page.
Translate Render Props - #94
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
michellocana
commented
Feb 13, 2019
Acho que os comentários dos exemplos poderiam ser traduzidos também, para ajudar no entendimento 😄 |
italotabatinga
commented
Feb 13, 2019
Não tinha lembrado deles 😐 Mas traduzi agora e também corrigi as sugestões acima 😄 |
eduardomoroni
left a comment
There was a problem hiding this comment.
@italotabatinga Muito obrigado.
| ### Tenha cuidado ao utilizar _Render Props_ num React.PureComponent {#be-careful-when-using-render-props-with-reactpurecomponent} | ||
| 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.
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.
Qual seria o termo? Shallow Prop Comparison?
| ``` | ||
| ## Caveats {#caveats} | ||
| ## Avisos {#caveats} |
There was a problem hiding this comment.
Acho que poderiamos adicionar no glossario.
eduardomoroni
commented
Feb 14, 2019
@michellocana se estiver bom pra ti eu mergeio este:) |
michellocana
commented
Feb 14, 2019
@eduardomoroni me parece bom, podemos dar merge 😄 |
eduardomoroni
commented
Feb 14, 2019
@michellocana tu podes aprovas o PR? O merge ta bloqueado até ter 2 aproves 👍 |
eduardomoroni
commented
Feb 14, 2019
Ops, parece que eu posso burlar isso. |
Tradução da página Render Props
Vale a pena dar uma olhada