Skip to content

Commit 1ca4b4e

Browse files
authored
Update basic-reactivity.md
Translated from english to portuguese.
1 parent 341ce93 commit 1ca4b4e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/api/basic-reactivity.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ A conversão reativa é "profunda" - ela afeta todas as propriedades aninhadas.
1818
function reactive<T extends object>(target: T): UnwrapNestedRefs<T>
1919
```
2020

21-
::: tip Note
22-
`reactive` will unwrap all the deep [refs](./refs-api.html#ref), while maintaining the ref reactivity
21+
::: tip Nota
22+
`reactive` irá desempacotar profundamente todas as [refs](./refs-api.html#ref), enquanto mantém a reativida da ref
2323

2424
```ts
2525
const count = ref(1)
2626
const obj = reactive({ count })
2727
28-
// ref will be unwrapped
28+
// A ref será desempacotada
2929
console.log(obj.count === count.value) // true
3030
31-
// it will update `obj.count`
31+
// Isto vai atualizar `obj.count`
3232
count.value++
3333
console.log(count.value) // 2
3434
console.log(obj.count) // 2
3535
36-
// it will also update `count` ref
36+
// Isto vai apenas atualizar a ref `count`
3737
obj.count++
3838
console.log(obj.count) // 3
3939
console.log(count.value) // 3
4040
```
4141

4242
:::
4343

44-
::: warning Important
45-
When assigning a [ref](./refs-api.html#ref) to a `reactive` property, that ref will be automatically unwrapped.
44+
::: warning Importante
45+
Ao atribuir um [ref](./refs-api.html#ref) a uma propriedade `reactive`, este ref será automaticamente desempacotado.
4646

4747
```ts
4848
const count = ref(1)
@@ -77,7 +77,7 @@ original.count++
7777
copy.count++ // aviso!
7878
```
7979

80-
As with [`reactive`](#reactive), if any property uses a `ref` it will be automatically unwrapped when it is accessed via the proxy:
80+
Assim como acontece com [`reactive`](#reactive), se alguma propriedade usar `ref`, este será automaticamente desempacotado quando for acessado pelo proxy:
8181

8282
```js
8383
const raw = {

0 commit comments

Comments
 (0)