Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed Dec 4, 2023
1 parent b203d2b commit 2378015
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ When a component instance is reinitialised on history restore (the user navigate
### data-version
A versioning string or hash that will be appended to your script, for cache-busting.

## The `BoosterPack` class
## The `Booster` class

Components are ES6 module classes that extend the `BoosterPack` base class. They are imported dynamically on demand and run directly in the browser. If you need to import npm packages you can use CDNs such as [Skypack](https://www.skypack.dev/), [ESM](https://esm.sh) and [Unpkg](https://unpkg.com), or just host the package files in your project.
Components are ES6 module classes that extend the `Booster` base class. They are imported dynamically on demand and run directly in the browser. If you need to import npm packages you can use CDNs such as [Skypack](https://www.skypack.dev/), [ESM](https://esm.sh) and [Unpkg](https://unpkg.com), or just host the package files in your project.

### Properties

Expand Down Expand Up @@ -179,7 +179,7 @@ Use this method to initialise your component logic.
````

#### unmount()
Use this method to remove any references to elements in the DOM so that the browser can perform garbage collection and release memory. Remove any event listeners and observers that you created. The framework automatically tracks event listeners added to elements and provides a convenience function `clearEventListeners()` that can clean things up for you.
Use this method to remove any references to elements in the DOM so that the browser can perform garbage collection and release memory. Remove any event listeners and observers that you created, and destroy state if you set it. The framework automatically tracks event listeners added to elements and provides a convenience function `clearEventListeners()` that can clean things up for you.

```js
unmount() {
Expand Down Expand Up @@ -334,7 +334,6 @@ Strategies can be combined by separating with a pipe |, allowing for advanced an
<div id="my-thing-1" data-booster="myThing" data-load="idle | visible | media (min-width: 1024px)"></div>
```


## Thank you

Inspired by:
Expand Down

0 comments on commit 2378015

Please sign in to comment.