# How do I fetch a collection on component load?

**URL:** <https://community.weweb.io/t/how-do-i-fetch-a-collection-on-component-load/5938>\
**Category:** Ask us anything\
**Created:** [December 14, 2023, 9:08am UTC](https://community.weweb.io/t/how-do-i-fetch-a-collection-on-component-load/5938 "2023-12-14T09:08:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [December 14, 2023, 9:08am UTC](https://community.weweb.io/t/how-do-i-fetch-a-collection-on-component-load/5938/1 "2023-12-14T09:08:52Z")

</div>

Hi! I’m noticing collections needed in components don’t load automatically. I have to fetch it explicitly on page load.

is there a way to fetch a collection when a component is loaded automatically?

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [December 14, 2023, 9:41am UTC](https://community.weweb.io/t/how-do-i-fetch-a-collection-on-component-load/5938/2 "2023-12-14T09:41:05Z")

</div>

Hi @raelyn, collections should be fetched in your usecase, can you open a ticket so that we check what is the bug on your project?

For your second question, we are adding an onMount trigger, this will be available soon 🙂
