> For the complete documentation index, see [llms.txt](https://creatorlabs.gitbook.io/boltui-docs-preview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://creatorlabs.gitbook.io/boltui-docs-preview/api-reference/index/onload.md).

# onLoad

### Definition

```javascript
function onLoad(callback: function, ...dependency: State)
```

### Input

* `callback` : takes a callback function which can be asynchronous which is ran at the start of the creation of a component and then will re-run if any state is binded
* `dependency` : list of all the states to listen to, and to re-run the callback when the states are updated
