# How to tell if page is loading in theme component / widget?

**URL:** https://meta.discourse.org/t/how-to-tell-if-page-is-loading-in-theme-component-widget/190190
**Category:** Development
**Created:** [May 12, 2021, 1:41pm UTC](https://meta.discourse.org/t/how-to-tell-if-page-is-loading-in-theme-component-widget/190190 "2021-05-12T13:41:26Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [June 4, 2021, 9:24pm UTC](https://meta.discourse.org/t/how-to-tell-if-page-is-loading-in-theme-component-widget/190190/11 "2021-06-04T21:24:43Z")

</div>

The code I am sharing isn’t from a widget, but it is from a component that we did release for download [here on meta](https://meta.discourse.org/t/showcased-categories-theme-component/173524).

In it we use the router, along with `@discourseComputed` to check if the route has changed, and render based on that.

You can look deeper into the code if you are interested in how it works.

> <https://github.com/discourse/discourse-showcased-categories/blob/2a340c0675a4ee5683449229eeb052f25a546999/javascripts/discourse/components/two-topic-list.js#L9-L10>

---

_[View the full topic](https://meta.discourse.org/t/how-to-tell-if-page-is-loading-in-theme-component-widget/190190)._
