You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`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.
47
47
48
-
#### Returns {/*returns*/}
48
+
#### Devuelve {/*returns*/}
49
49
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.
51
51
52
52
---
53
53
54
-
## Usage {/*usage*/}
54
+
## Uso {/*usage*/}
55
55
56
-
Call `unmountComponentAtNode`to remove a <CodeStepstep={1}>mounted React component</CodeStep> from a <CodeStepstep={2}>browser DOM node</CodeStep> and clean up its event handlers and state.
56
+
Llama a `unmountComponentAtNode`para eliminar un <CodeStepstep={1}>componente de React montado</CodeStep> de un <CodeStepstep={2}>nodo DOM del navegador</CodeStep> y limpiar sus controladores de eventos y estado.
### 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*/}
71
71
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ó.
73
73
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:
75
75
76
76
<Sandpack>
77
77
78
78
```html index.html
79
79
<!DOCTYPE html>
80
80
<html>
81
-
<head><title>My app</title></head>
81
+
<head><title>Mi App</title></head>
82
82
<body>
83
-
<buttonid='render'>Render React App</button>
84
-
<buttonid='unmount'>Unmount React App</button>
85
-
<!--This is the React App node-->
83
+
<buttonid='render'>Renderizar aplicación de React</button>
84
+
<buttonid='unmount'>Desmontar aplicación de React</button>
0 commit comments