Skip to content

Commit a1d51c5

Browse files
translate: unmountComponentAtNode.md (#700)
* translate page --------- Co-authored-by: Mateo Guzmán <[email protected]>
1 parent fba696c commit a1d51c5

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/content/reference/react-dom/unmountComponentAtNode.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ title: unmountComponentAtNode
44

55
<Deprecated>
66

7-
This API will be removed in a future major version of React.
7+
Esta API se eliminará en una versión mayor futura de React.
88

9-
In React 18, `unmountComponentAtNode` was replaced by [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount).
9+
En React 18, `unmountComponentAtNode` fue reemplazado por [`root.unmount()`](/reference/react-dom/client/createRoot#root-unmount).
1010

1111
</Deprecated>
1212

1313
<Intro>
1414

15-
`unmountComponentAtNode` removes a mounted React component from the DOM.
15+
`unmountComponentAtNode` elimina un componente de React montado del DOM.
1616

1717
```js
1818
unmountComponentAtNode(domNode)
@@ -24,11 +24,11 @@ unmountComponentAtNode(domNode)
2424

2525
---
2626

27-
## Reference {/*reference*/}
27+
## Referencia {/*reference*/}
2828

2929
### `unmountComponentAtNode(domNode)` {/*unmountcomponentatnode*/}
3030

31-
Call `unmountComponentAtNode` to remove a mounted React component from the DOM and clean up its event handlers and state.
31+
Llama a `unmountComponentAtNode` para eliminar un componente de React montado del DOM y limpiar sus controladores de eventos y estado.
3232

3333
```js
3434
import { unmountComponentAtNode } from 'react-dom';
@@ -39,21 +39,21 @@ render(<App />, domNode);
3939
unmountComponentAtNode(domNode);
4040
```
4141

42-
[See more examples below.](#usage)
42+
[Ver más ejemplos a continuación.](#usage)
4343

44-
#### Parameters {/*parameters*/}
44+
#### Parámetros {/*parameters*/}
4545

46-
* `domNode`: A [DOM element.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React will remove a mounted React component from this element.
46+
* `domNode`: Un [elemento DOM.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React eliminará un componente de React montado de este elemento.
4747

48-
#### Returns {/*returns*/}
48+
#### Devuelve {/*returns*/}
4949

50-
`unmountComponentAtNode` returns `true` if a component was unmounted and `false` otherwise.
50+
`unmountComponentAtNode` devuelve `true` si se desmontó un componente y `false` en caso contrario.
5151

5252
---
5353

54-
## Usage {/*usage*/}
54+
## Uso {/*usage*/}
5555

56-
Call `unmountComponentAtNode` to remove a <CodeStep step={1}>mounted React component</CodeStep> from a <CodeStep step={2}>browser DOM node</CodeStep> and clean up its event handlers and state.
56+
Llama a `unmountComponentAtNode` para eliminar un <CodeStep step={1}>componente de React montado</CodeStep> de un <CodeStep step={2}>nodo DOM del navegador</CodeStep> y limpiar sus controladores de eventos y estado.
5757

5858
```js [[1, 5, "<App />"], [2, 5, "rootNode"], [2, 8, "rootNode"]]
5959
import { render, unmountComponentAtNode } from 'react-dom';
@@ -67,22 +67,22 @@ unmountComponentAtNode(rootNode);
6767
```
6868

6969

70-
### Removing a React app from a DOM element {/*removing-a-react-app-from-a-dom-element*/}
70+
### Eliminando una aplicación de React de un elemento DOM {/*removing-a-react-app-from-a-dom-element*/}
7171

72-
Occasionally, you may want to "sprinkle" React on an existing page, or a page that is not fully written in React. In those cases, you may need to "stop" the React app, by removing all of the UI, state, and listeners from the DOM node it was rendered to.
72+
En ocasiones, es posible que desees "añadir" React a una página existente o a una página que no está completamente escrita en React. En esos casos, es posible que necesites "detener" la aplicación de React eliminando toda la interfaz de usuario, el estado y los controladores de eventos del nodo DOM en el que se renderizó.
7373

74-
In this example, clicking "Render React App" will render a React app. Click "Unmount React App" to destroy it:
74+
En este ejemplo, al hacer clic en "Renderizar aplicación de React" se renderizará una aplicación de React. Haz clic en "Desmontar aplicación de React" para destruirla:
7575

7676
<Sandpack>
7777

7878
```html index.html
7979
<!DOCTYPE html>
8080
<html>
81-
<head><title>My app</title></head>
81+
<head><title>Mi App</title></head>
8282
<body>
83-
<button id='render'>Render React App</button>
84-
<button id='unmount'>Unmount React App</button>
85-
<!-- This is the React App node -->
83+
<button id='render'>Renderizar aplicación de React</button>
84+
<button id='unmount'>Desmontar aplicación de React</button>
85+
<!-- Este es el nodo de la aplicación de React -->
8686
<div id='root'></div>
8787
</body>
8888
</html>

0 commit comments

Comments
 (0)