Skip to content
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

Merged
merged 3 commits into from Feb 14, 2019

Conversation

italotabatinga
Copy link
Contributor

Tradução da página Render Props

Vale a pena dar uma olhada

  • Cross-Cutting Concerns -> Características Transversais (link)
  • High-Order Components -> High-Order Components
  • Close over -> esconder

@cezaraugusto cezaraugusto added the needs review A pull request ready to be reviewed label Feb 13, 2019
content/docs/render-props.md Outdated Show resolved Hide resolved
content/docs/render-props.md Outdated Show resolved Hide resolved
content/docs/render-props.md Outdated Show resolved Hide resolved
content/docs/render-props.md Outdated Show resolved Hide resolved
content/docs/render-props.md Outdated Show resolved Hide resolved
@michellocana
Copy link
Contributor

Acho que os comentários dos exemplos poderiam ser traduzidos também, para ajudar no entendimento 😄

@italotabatinga
Copy link
Contributor Author

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 😄

@eduardomoroni eduardomoroni added needs +1 Needs another approval before merging and removed needs review A pull request ready to be reviewed labels Feb 14, 2019
Copy link
Member

@eduardomoroni eduardomoroni left a 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_.
Copy link
Member

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.

Copy link
Contributor Author

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}
Copy link
Member

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.

@eduardomoroni
Copy link
Member

@michellocana se estiver bom pra ti eu mergeio este:)

@eduardomoroni eduardomoroni added feedback addressed and removed needs +1 Needs another approval before merging labels Feb 14, 2019
@michellocana
Copy link
Contributor

@eduardomoroni me parece bom, podemos dar merge 😄

@eduardomoroni
Copy link
Member

@michellocana tu podes aprovas o PR? O merge ta bloqueado até ter 2 aproves 👍

@eduardomoroni eduardomoroni merged commit a40e202 into reactjs:master Feb 14, 2019
@eduardomoroni
Copy link
Member

Ops, parece que eu posso burlar isso.

Copy link
Contributor

@michellocana michellocana left a comment

Choose a reason for hiding this comment

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

SGTM 😄

@italotabatinga italotabatinga deleted the pt-br-render-props branch February 14, 2019 14:44
@cezaraugusto cezaraugusto added 🌐 translated Translation is completed for this page and removed feedback addressed labels Feb 14, 2019
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.

None yet

4 participants