# How to replace existing widget with my own

**URL:** https://meta.discourse.org/t/how-to-replace-existing-widget-with-my-own/47433
**Category:** Development
**Created:** [Julho 17, 2016, 8:20pm UTC](https://meta.discourse.org/t/how-to-replace-existing-widget-with-my-own/47433 "2016-07-17T20:20:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [Julho 17, 2016, 8:20pm UTC](https://meta.discourse.org/t/how-to-replace-existing-widget-with-my-own/47433/1 "2016-07-17T20:20:46Z")

</div>

> [@A tour of how the Widget (Virtual DOM) code in Discourse works](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347):
>
> This is out of date. See [Widgets, the Widget API and their roadmap?](https://meta.discourse.org/t/widgets-the-widget-api-and-their-roadmap/292624) The latest builds of Discourse are much faster at rendering topics thanks to our [re-written post stream](https://eviltrout.com/2016/02/25/fixing-android-performance.html). I’ve written up [our new plugin API](https://meta.discourse.org/t/a-new-versioned-api-for-client-side-plugins/40051) but so far haven’t explained how the code all fits together. The purpose of this topic is to allow Discourse developers to understand how the new code works. What’s a Virtual DOM? A Virtual DOM is a data structure that enables browsers to re-render dynamic content very quickly. The techniq…

Now I know how to write a widget and display it via plugin. But how can I replace discourse’s existing widget like ‘hamburger-categories’ with my own custom widget.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [Julho 18, 2016, 8:07pm UTC](https://meta.discourse.org/t/how-to-replace-existing-widget-with-my-own/47433/2 "2016-07-18T20:07:20Z")

</div>

If you `createWidget` with the same name (`hamburger-categories`) it should replace the existing one with yours.
