---
title: "Discussion on \"How to destroy Preact node?\" | Hashnode"
description: "Discussion on \"How to destroy Preact node?\". In this article, we review a code snippet from react-scan codebase shown below.\ncontainer.remove = () => {\n    window.__REACT_SCAN_TOOLBAR_CONTAINER__ = undefined;\n\n    if (container.hasChildNodes()) {\n      // Double render(null) is needed to fully ..."
url: "https://hashnode.com/posts/how-to-destroy-preact-node/67c6a1ccc5997908f2a21b9e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to destroy Preact node?](https://thinkthroo.com/blog/how-to-destroy-preact-node?utm_source=hashnode&utm_medium=feed)

In this article, we review a code snippet from react-scan codebase shown below. container.remove = () => { window.\_\_REACT\_SCAN\_TOOLBAR\_CONTAINER\_\_ = undefined; if (container.hasChildNodes()) { // Double render(null) is needed to fully ...

Mar 4, 2025 · 2 min read · thinkthroo.com  
Updated Apr 3, 2025  
Read the article

-   [#unamount](https://hashnode.com/tag/unamount)
-   [#preact](https://hashnode.com/tag/preact)
-   [#performance](https://hashnode.com/tag/performance)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#destroy](https://hashnode.com/tag/destroy)

## Written by

[Ramu Narasinga](https://hashnode.com/@ramunarasinga)

@ramunarasinga · India

  
[View profile](https://hashnode.com/@ramunarasinga)

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
