# How to render Component inside Widget?

**URL:** https://meta.discourse.org/t/how-to-render-component-inside-widget/52872
**Category:** Development
**Created:** [November 14, 2016, 10:21am UTC](https://meta.discourse.org/t/how-to-render-component-inside-widget/52872 "2016-11-14T10:21:07Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [November 14, 2016, 4:45pm UTC](https://meta.discourse.org/t/how-to-render-component-inside-widget/52872/2 "2016-11-14T16:45:25Z")

</div>

If you have control over what you’re doing, I recommend rendering a widget within a widget rather than a component. However, in the cases where that’s not an option you can use the `connect` function of the decorator helper:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/decorator-helper.js.es6#L88-L107](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/decorator-helper.js.es6#L88-L107)

---

_[View the full topic](https://meta.discourse.org/t/how-to-render-component-inside-widget/52872)._
