Skip to content

Translate the blog post React v15.0.1 #379

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 6 commits into from
Dec 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions content/blog/2016-04-08-react-v15.0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ title: "React v15.0.1"
author: [zpao]
---

Yesterday afternoon we shipped v15.0.0 and quickly got some feedback about a couple of issues. We apologize for these problems and we've been working since then to make sure we get fixes into your hands as quickly as possible.
Ontem à tarde, lançamos a v15.0.0 e rapidamente obtivemos alguns comentários sobre alguns problemas. Pedimos desculpas por esses problemas e trabalhamos desde então para garantir que as correções cheguem às suas mãos o mais rápido possível.

The first of these issues is related to the removal of an undocumented API. This API was added to enable [JSX Spread Attributes](/docs/jsx-spread.html) in our JS compile tools (react-tools, JSXTransformer) before `Object.assign` was standard. When we stopped supporting these tools last year, we kept the API there to catch the longer tail of people using those tools. Meanwhile we moved to using Babel and encouraged others to do the same. Babel will typically compile the spread use to an `_extends` helper, which will use `Object.assign`. We did not properly research other compilation tools before deciding to remove the API in v15. Specifically, TypeScript and coffee-react are two popular packages using `React.__spread`, as well as reactify which still makes use react-tools. In order to make sure that code compiled with these tools is not broken, we will be restoring the `React.__spread` API and adding a warning. It will be removed in the future so if you maintain a project making using of it, we encourage you to compile to `Object.assign` directly or a similar helper function.
O primeiro desses problemas está relacionado à remoção de uma API não documentada. Esta API foi adicionada para ativar [JSX Spread Attributes](/docs/jsx-spread.html) em nossas ferramentas de compilação JS (react-tools, JSXTransformer) antes que o `Object.assign` fosse padrão. Quando paramos de oferecer suporte a essas ferramentas no ano passado, mantivemos a API lá para atrair a atenção das pessoas que as usam. Enquanto isso, passamos a usar Babel e incentivamos outros a fazer o mesmo. Babel normalmente compila o uso do spread para um auxiliar `_extends`, que utilizará `Object.assign`. Não pesquisamos adequadamente outras ferramentas de compilação antes de decidir remover a API na v15. Especificamente, TypeScript e coffee-react são dois pacotes populares usando o `React.__spread`, bem como o reactify, que ainda utiliza o react-tools. Para garantir que o código compilado com essas ferramentas não seja quebrado, restauraremos a API `React.__spread` e adicionaremos um aviso. Ele será removido no futuro, portanto, se você mantiver um projeto fazendo uso dele, recomendamos que você compile diretamente o `Object.assign` ou uma função auxiliar semelhante.

The second issue resulted in cursor position being lost in controlled inputs. We merged a pull request earlier this week to fix a separate regression from v0.14. Our goal was to target `<option>` elements but we ended up targeting all interactions with `value` properties. Unfortunately we didn't test it as thoroughly as we thought. We backed out the offending change and fixed the issue in different way which doesn't have the same problem.
O segundo problema resultou na perda da posição do cursor em entradas controladas. Mesclamos uma solicitação pull no início desta semana para corrigir uma regressão separada da v0.14. Nosso objetivo era segmentar os elementos `<option>`, mas acabamos segmentando todas as interações com as propriedades `value`. Infelizmente, não o testamos tão bem quanto pensávamos. Apoiamos a alteração ofensiva e corrigimos o problema de maneira diferente, que não tem o mesmo problema.

We apologize if you installed 15.0.0 and have encountered these issues yourselves.
Lamentamos se você instalou o 15.0.0 e se esses problemas foram enfrentados.

As usual, you can get install the `react` package via npm or download a browser bundle.
Como de costume, você pode instalar o pacote `react` via npm ou fazer o download de um pacote de navegador.

* **React**
Dev build with warnings: <https://fb.me/react-15.0.1.js>
Minified build for production: <https://fb.me/react-15.0.1.min.js>
* **React with Add-Ons**
Dev build with warnings: <https://fb.me/react-with-addons-15.0.1.js>
Minified build for production: <https://fb.me/react-with-addons-15.0.1.min.js>
* **React DOM** (include React in the page before React DOM)
Dev build with warnings: <https://fb.me/react-dom-15.0.1.js>
Minified build for production: <https://fb.me/react-dom-15.0.1.min.js>
Build de desenvolvimento com avisos: <https://fb.me/react-15.0.1.js>
Build reduzida para produção: <https://fb.me/react-15.0.1.min.js>
* **React com Add-Ons**
Build de desenvolvimento com avisos: <https://fb.me/react-with-addons-15.0.1.js>
Build reduzida para produção: <https://fb.me/react-with-addons-15.0.1.min.js>
* **React DOM** (inclua React na página antes de React DOM)
Build de desenvolvimento com avisos: <https://fb.me/react-dom-15.0.1.js>
Build reduzida para produção: <https://fb.me/react-dom-15.0.1.min.js>

## Changelog {#changelog}

### React {#react}
- Restore `React.__spread` API to unbreak code compiled with some tools making use of this undocumented API. It is now officially deprecated.
<small>[@zpao](https://github.com/zpao) in [#6444](https://github.com/facebook/react/pull/6444)</small>
- Restaure a API `React.__spread` para descompactar o código compilado com algumas ferramentas que fazem uso dessa API não documentada. Agora está oficialmente obsoleto.
<small>[@zpao](https://github.com/zpao) em [#6444](https://github.com/facebook/react/pull/6444)</small>

### ReactDOM {#reactdom}
- Fixed issue resulting in loss of cursor position in controlled inputs.
<small>[@sophiebits](https://github.com/sophiebits) in [#6449](https://github.com/facebook/react/pull/6449)</small>
- Corrigido o problema que resultava na perda da posição do cursor nas entradas controladas.
<small>[@sophiebits](https://github.com/sophiebits) em [#6449](https://github.com/facebook/react/pull/6449)</small>