# A tour of how the Widget (Virtual DOM) code in Discourse works

**URL:** https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347
**Category:** Development
**Created:** [29 בפברואר,‏ 2016,‏ 8:18pm UTC](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347 "2016-02-29T20:18:39Z")
**Posts on this page:** 1
**Showing post:** 44

<div class="post-metadata">

### Author: ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)
#### Post date: [13 ביוני,‏ 2016,‏ 10:14pm UTC](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347/44 "2016-06-13T22:14:18Z")

</div>

> [@tgxworld](#):
>
> api.decorateWidget(“hamburger-menu:generalLinks”, \_ =\> {  
> return { route: ‘birthdays’, label: ‘birthdays.title’ };  
> });

I was trying:

```plaintext
api.decorateWidget("hamburger-menu:generalLinks", _ => {
   return [{ route: 'birthdays', label: 'birthdays.title' }, {route: 'another', label: 'another.title' }];
 });

```

---

_[View the full topic](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347)._
